Repository navigation
fix: error_rate in incident #1 - #6
Merged
Merged
Conversation
1816x
force-pushed
the
fix/incident-1
branch
2 times, most recently
from
July 31, 2026 16:28
b1e97a4 to
6074d8f
Compare
Key the price table by the same type validation checks against, so a value that passes KNOWN_IDS cannot miss PRICE_CENTS_BY_ID. Fixing the key type addresses the mismatch itself; coercing at the call site or catching KeyError would only hide it while leaving the two structures disagreeing.
1816x
pushed a commit
that referenced
this pull request
Jul 31, 2026
Marks F4 closed with the live verification that closes the MVP: PR #6, a one-line B1 fix against demo/b1-8f2e079, all three CI jobs green. The design-decisions entry covers why the injected bug had to be published to its own branch (the MVP gate was literally unreachable otherwise), why validation happens in a worktree cut from the PR's base rather than HEAD, why red-before is recorded but not required, and why the PR opener's guardrails are about blast radius rather than correctness. It also records what Phase 4 did not verify — the opener's own HTTP request has never been accepted by GitHub, the same shape of gap as Phase 3's unproven LiveCompleter — and the four defects the phase surfaced, none of which were in the new code's happy path: a monitor that died at startup under a concurrent reader, a Phase 3 transcript whose diff could never have applied, a gate validating the wrong tree, and an unbounded ruff that let CI and local machines disagree. README and PLAN.md now state the narrowed injected-bug policy ("never to main" rather than "never") instead of the old absolute, and document the --dry-run-pr / --open-pr flow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ED78yHTbDpHFfQ7n8tWja
Closed
1816x
pushed a commit
that referenced
this pull request
Jul 31, 2026
PR #6 was merged by a human reviewer into demo/b1-8f2e079, which is the part of the loop worth stating explicitly: the agent investigates, proposes, proves the fix turns the suite green, and stops. Nothing merges itself. PLAN.md and the README said only that the PR was opened with CI green. True, but it undersold the outcome and left the human-gate design decision implicit at exactly the point where it is demonstrated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ED78yHTbDpHFfQ7n8tWja
1816x
pushed a commit
that referenced
this pull request
Jul 31, 2026
What ships per layer, the MVP gate with PR #6 as its evidence, what Phase 5 added, and the limitations — led by the one that has been open since Phase 3: neither outward-facing API call has ever been made for real. The tag itself is not cut here. A release tag on an unmerged feature branch would point at history main has never had, so `chore(release): tag v0.1.0` belongs on the merge commit. PLAN.md's F5 checklist is corrected to say so rather than claiming a tag that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MpBoJ5sHCxp2WCBQPQ4bh
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.
Automated fix for incident #1 (
error_rate).What the monitor saw
error_rateRoot cause
PRICE_CENTS_BY_ID is built with str(p["id"]) as its keys, while validation checks the incoming product_id against KNOWN_IDS, which holds the raw ints. A request with a valid integer id therefore passes validation and then misses the price table, raising KeyError. Because the miss happens after validation succeeds, every well-formed checkout fails with an unhandled 500 rather than a 4xx.
Suspect commit:
HEADWhy this fix
Key the price table by the same type validation checks against, so a value that passes KNOWN_IDS cannot miss PRICE_CENTS_BY_ID. Fixing the key type addresses the mismatch itself; coercing at the call site or catching KeyError would only hide it while leaving the two structures disagreeing.
What was verified
demo/b1-8f2e079: yesfailedpassedProvenance
Opened by the self-healing agent. Nothing here was merged automatically — this branch exists for a human to review.
How this PR was submitted: the agent produced the branch, this body, and the validation evidence above on its own. The final
POST /pullswent through the session's GitHub tooling rather than the agent's own HTTP call, because this sandbox'sGITHUB_TOKENis proxied and returns 403 for direct API calls. The agent handled that correctly — it recorded the incident asfix_validatedwith the error attached rather than discarding the validation result.Base branch:
demo/b1-8f2e079carries the deliberately injected B1 bug (seescripts/inject_bug.sh). That is what makes this a real, mergeable fix rather than a diff against code the bug was never in.mainnever carries an injected bug.