sdk: round-5 CLI follow-ups — close last two producer↔recognizer drift guards (#0434)#245
Merged
Merged
Conversation
…drift guards (#0434) Round-4 audit converged: doc/code drift, numeric/units, untested helpers, tautologies, zero-coverage commands, CLI DRY all CLEAN. Only genuine remaining finding = the last two instances of the #0425/#0407 producer↔recognizer-drift class: - buildQuests output → isQuestApproval + doesCollectionFollowQuestProtocol - buildPredictionMarket output → isPredictionMarketValid + validatePredictionMarketCollection Both run through normalizeForReview (the indexer's bigint normalization) then asserted against their own recognizer — mirrors the closed subscription #0425 guard. Both pass (no actual drift; the guards now lock it in against future field renames / added recognizer constraints that would otherwise make CLI-built quests/PMs unrecognizable on the FE with a green suite). Test-only, no source change. Build clean (no circular deps); unit 143 suites / 3110 tests; integration 20 suites / 186 tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Stacked on #244 (base
feat/0431-cli-followups-r4). Final round of the rolling CLI audit. Round-4's sweep converged: doc/code drift, numeric/units correctness, untested helpers, integration tautologies, zero-coverage commands, and CLI-DRY all came back CLEAN. The only genuine remaining finding is the last two instances of the #0425/#0407 producer↔recognizer-drift class:buildQuestsoutput is now round-tripped throughnormalizeForReviewand asserted to satisfyisQuestApproval+doesCollectionFollowQuestProtocol;buildPredictionMarketoutput asserted againstvalidatePredictionMarketCollection+isPredictionMarketValid. Both recognizers were previously tested only against hand-rolled all-bigint fixtures, never the builders' own wire output — a field rename or added recognizer constraint could make every CLI-built quest/PM unrecognizable on the frontend with a fully green suite. Mirrors the closed subscription #0425 guard. Both guards pass (no actual drift today — they lock it in).Test-only; no source or docs change.
Validation
tsc×2, no circular dependencies.Test plan
bun run build/test:unit/test:integrationgreen#0434quests + prediction-market drift-guard tests fail if a builder field is renamed🤖 Generated with Claude Code
Stack: main ← #242 ← #243 ← #244 ← this. Audit converged — this is the final stacked round.