Conversation
Production preview test caught a real show-stopper: the MCP tool's mode parameter Zod schema accepted only exploration/planning/execution but the calibration governance article (odd/challenge/stakes-calibration) defines 9 modes. The 6 writing-lifecycle modes (voice-dump, drafting, peer-review-ready, canon-tier-2, canon-tier-1, published-essay) were unreachable from the public API — schema validation rejected them before runtime ever saw them. Net effect of the bug: the voice-dump suppression invariant — the load-bearing feature of PR #100, named in evidence as load-bearing — could not be exercised through the public MCP tool. Internal tests worked because they bypassed the schema. The CI 'Test CF Preview' job failed on cold-start timeout (red herring); the real failure was discovered by manual curl against the preview. Two sites in workers/src/index.ts: - Line 170: unified oddkit tool - Line 235: dedicated oddkit_challenge tool Both expanded to the full 9-mode enum. Description text updated to explain the two mode families and call out voice-dump suppression. Longer-term direction (not this commit): drop the enum entirely and let canon be the validator. The runtime already validates against the calibration table at fetchStakesCalibration time — having the schema also enforce vocabulary is the same Vodka anti-pattern shape that PR #100 fixed for stop words. Tracked as a follow-up. Verification: - npm run typecheck: clean - workers/test/governance-parser.test.mjs: 97/97 against main - Manual preview curl with mode=voice-dump pending after this deploys Lesson: testing the running preview is not optional. PR #100 had typecheck pass, parser test 97/97, smoke 6/6, AND production preview deploy succeed — and still shipped a feature the schema blocked from being called. Three layers of verification missed it because none of them exercised the public API contract.
…s-writing-modes
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
oddkit | daa9a96 | Commit Preview URL Branch Preview URL |
Apr 17 2026, 05:00 PM |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Mode enum not updated in local tool registry
- Expanded the
modeenum in both the orchestrator tool andoddkit_challengeschemas insrc/core/tool-registry.jsto include the six writing-lifecycle modes, matching the workers schema.
- Expanded the
Preview (aa6208da31)
diff --git a/src/core/tool-registry.js b/src/core/tool-registry.js
--- a/src/core/tool-registry.js
+++ b/src/core/tool-registry.js
@@ -46,8 +46,12 @@
},
mode: {
type: "string",
- enum: ["exploration", "planning", "execution"],
- description: "Optional epistemic mode hint.",
+ enum: [
+ "exploration", "planning", "execution",
+ "voice-dump", "drafting", "peer-review-ready",
+ "canon-tier-2", "canon-tier-1", "published-essay",
+ ],
+ description: "Optional mode hint. Epistemic modes (exploration/planning/execution) or writing-lifecycle modes (voice-dump/drafting/peer-review-ready/canon-tier-2/canon-tier-1/published-essay). Sourced from odd/challenge/stakes-calibration.",
},
canon_url: {
type: "string",
@@ -107,7 +111,7 @@
type: "object",
properties: {
input: { type: "string", description: "A claim, assumption, or proposal to challenge." },
- mode: { type: "string", enum: ["exploration", "planning", "execution"], description: "Optional epistemic mode for proportional challenge." },
+ mode: { type: "string", enum: ["exploration", "planning", "execution", "voice-dump", "drafting", "peer-review-ready", "canon-tier-2", "canon-tier-1", "published-essay"], description: "Mode for proportional challenge. Epistemic (exploration/planning/execution) or writing-lifecycle (voice-dump/drafting/peer-review-ready/canon-tier-2/canon-tier-1/published-essay). voice-dump suppresses all challenge output." },
canon_url: { type: "string", description: "Optional: GitHub repo URL for canon override." },
},
required: ["input"],You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit aa6208d. Configure here.
klappy
added a commit
that referenced
this pull request
Apr 17, 2026
Parallels PR #102 which fixed the same enum in workers/src/index.ts. The local tool registry at src/core/tool-registry.js drives the local MCP server (src/mcp/server.js) and CLI (src/cli.js) and had the same 3-mode enum, creating a contract divergence between the deployment surfaces for the same logical API. Two sites in src/core/tool-registry.js: - Line 47-55 (unified oddkit tool) - Line 113-121 (dedicated oddkit_challenge tool) Both expanded to the full 9-mode enum with description text matching PR #102's style. Mode families explained, voice-dump suppression called out in the dedicated tool description. Sweep verified: grep across src/ and workers/ for the 3-mode string returns only the first line of each 9-mode block now — zero stale enums. Caught by bugbot on PR #103 (the promotion PR for #102). Flagged appropriately as Low severity (the CF Worker surface is the primary production path; the local surface is used for dev/CLI). Fixing in a separate PR so #103 can promote cleanly without rebase. Verification: - npm run typecheck: clean - tests/smoke.sh: 6/6 pass Longer-term (same as #102 flagged): drop enum entirely and let canon be the validator. Hardcoding mode vocabulary in schema is the same Vodka anti-pattern shape challenge stop words used to be.
) Parallels PR #102 which fixed the same enum in workers/src/index.ts. The local tool registry at src/core/tool-registry.js drives the local MCP server and CLI and had the same 3-mode enum, creating contract divergence between surfaces. Both sites expanded to 9-mode enum with description text matching PR #102 style.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Promote PR #102 (challenge mode enum schema fix) to production
Promotes the single commit from PR #102 (now in main) to prod. Unblocks the voice-dump suppression invariant — the load-bearing feature of PR #100 that has been unreachable from the public API since the original promotion (PR #101) merged at 15:28:44Z today.
What ships
workers/src/index.ts— Zod mode enum expanded from[exploration, planning, execution]to all 9 modes defined inodd/challenge/stakes-calibration.md:oddkittool (line 170) and dedicatedoddkit_challengetool (line 235)Verification plan after this lands
oddkit_challengewithmode: "voice-dump"and a strong-claim input. Expectstatus: "SUPPRESSED"withgovernancefield still populated (so the model sees what would have fired)oddkit_challengewithmode: "drafting"and same input. ExpectCHALLENGEDwith reduced challenge tier per calibrationKnown remaining production issues (not blocked by this PR)
discoverChallengeTypescan cache an empty result that persists untilcleanup_storageclears it. Tracked separately — needs either "don't cache empty" or "track error state in cache" fixRefs
Note
Low Risk
Schema-only expansion (no behavioral logic changes) and backwards-compatible for existing clients using the original three modes; main risk is minor client-side validation mismatches if consumers hardcode the old enum.
Overview
Expands the public tool schemas to accept the full set of writing-lifecycle modes (e.g.
voice-dump,drafting,peer-review-ready,canon-tier-*,published-essay) in addition toexploration/planning/execution.This updates both the shared JS tool registry (
oddkitorchestrator andoddkit_challenge) and the Cloudflare worker’s Zod schemas (unifiedoddkittool andoddkit_challenge), with descriptions clarifying the two mode families and thatvoice-dumpsuppresses challenge output.Reviewed by Cursor Bugbot for commit daa9a96. Bugbot is set up for automated code reviews on this repo. Configure here.