Conversation
* feat: governance-driven encode architecture E0008: Replace hardcoded detectEncodeType with governance-driven encoding. Server discovers encoding-type docs from canon via tag search, extracts field schemas/trigger words/quality criteria, parses structured (TSV) and unstructured input, scores per-type, teaches model via response. * fix: duplicate artifacts, stale cache, dead code, quality scoring in encode action - Add break after first type match in parseUnstructuredInput to prevent duplicate artifacts when a paragraph matches multiple encoding types - Key cachedEncodingTypes by canonUrl so different canon sources get separate cached encoding types within the same isolate - Remove unused detectEncodeTypeFromGovernance function (dead code) - Fix scoreArtifactQuality: require score >= mx (not mx-1) for strong so a 0/1 score no longer rates as strong - Fix misleading DOLCHE comment to OLDC+H (matches actual 5-type system) * fix: restore multi-type paragraph matching (intentional design) Reverts bugbot's break; addition in parseUnstructuredInput. Multiple type matches per paragraph is an intentional design decision: a paragraph can be both Decision and Constraint simultaneously. This mirrors what the model would do with separate TSV rows. Added inline comment to prevent automated regression. * Fix three governance-driven encode bugs: fallback type, context artifacts, cache cleanup - Use first discovered governance type as fallback instead of hardcoded D/Decision for unmatched paragraphs in parseUnstructuredInput - Pass only input (not fullInput) to parseUnstructuredInput so context paragraphs are not encoded as standalone artifacts - Clear cachedEncodingTypes and cachedEncodingTypesCanonUrl in runCleanupStorage so governance doc updates take effect without worker isolate recycle * fix: merge context into fullInput in runEncodeAction to match runGateAction pattern The context parameter was accepted but never used in runEncodeAction, silently discarding supplementary context provided by callers. This restores the fullInput merging pattern used by runGateAction so that context is included in type detection, artifact parsing, and quality scoring. --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Claude (oddkit project) <chris@klapp.dev>
* feat: add consumer identification nudge for unidentified consumers * fix: add privacy assurance to consumer nudge text Nudge now leads with what oddkit does NOT track (prompts, searches, responses) before asking the consumer to self-identify. * docs: add inline comment explaining no-cache design Reverts bugbot's session cache additions. The server is stateless by design — caching consumer identification across requests violates Vodka Architecture and doesn't even work reliably on Cloudflare Workers' distributed isolates. The query param is the stateless solution. Inline comment prevents future regression. --------- Co-authored-by: Klappy <klappy@klappy.dev>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
oddkit | 4b95fbe | Commit Preview URL Branch Preview URL |
Apr 16 2026, 02:33 AM |
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.
Promotes the consumer identification nudge to production.
What ships
PR #95 (merged): adds a polite one-liner to oddkit responses when the consumer is unidentified. The nudge leads with privacy assurance (oddkit tracks tool usage, never prompts/searches/responses) before suggesting
?consumer=yourname.What this looks like
Unidentified consumers (curl, anonymous Cursor, etc.) see this appended to tool responses:
Identified consumers (anyone with
?consumer=,x-oddkit-clientheader, or MCPclientInfo.name) see nothing extra.Verified on main preview
curlagainstmain-oddkit.klappy.workers.dev/mcp→ nudge appears?consumer=testuser→ nudge correctly suppressedDesign notes
This is the lean +30/-2 version. Bugbot attempted to add session-based caching to remember identification across requests; that was reverted because (1) it violates Vodka Architecture statelessness, (2) Cloudflare Workers' distributed isolates make module-level Maps unreliable anyway, and (3) the query param solves it cleaner. An inline
DO NOT add session cachingcomment prevents future regression.Note
Medium Risk
Changes the
encoderesponse shape/semantics and adds per-response text injection for some clients, which could break consumers that assume the previous single-artifact format or exactassistant_textcontent.Overview
Unidentified MCP consumers now get a short privacy/telemetry disclosure +
?consumer=yournameprompt appended toassistant_textin tool responses; identification is determined per-request viaparseConsumerLabeland intentionally avoids any session/state caching.The
encodeaction is reworked to be governance-driven: it discovers encoding types and quality criteria from canon docs (with OLDC+H fallback), supports both TSV-structured and freeform inputs (including multi-typing a paragraph), returns a list of scored artifacts + governance metadata, and resets the new caches oncleanup_storage.Bumps package version to
0.16.0.Reviewed by Cursor Bugbot for commit 4b95fbe. Bugbot is set up for automated code reviews on this repo. Configure here.