Build two of §9.4's three rows, and close T480 and T502 - #191
Merged
Merged
Conversation
The first version of this branch recorded three unshipped names and left them. A gap that can be closed is closed; only the one whose name was wrong and whose reason was right stays as a row. **`hop=` and `task=` on `needs_approval` — built.** Without them the predicate evaluated against the receiver's whole candidate set while `execute` evaluates against the hop alone (§2.3), so it answered "a human is needed" for a call `execute` then refuses: the framework surfaces an approval item, a human says yes, the call fails anyway. Never an authority hole — `Control.execute` is the enforcement point and refuses either way — but it cost the framework its own approval item and left a receipt nobody could explain. `T128c` drives predicate and `execute` over one hop and asserts they agree, with the no-hop case as its negative control so the fixture is not one where everything is denied. Mutated back to the old call: fails. **`ctrlrun.hop/v1`'s key set — fixed in §6.2**, which listed eight of the eleven keys the document carries. `T506b` parses the table out of the spec and compares it to the emitted document, so the two cannot drift again. Mutated: one row deleted from the spec, T506b fails naming it. **`ssl_context=` stays unbuilt, and §9.4 is now one row saying why.** Check 3 lives where the gateway builds its forwarder, which is per-gateway where a parameter on the shared request helper would be per-process; adding it now would be a second way to configure one pin. **T480 — both halves.** The parser half asserts no identity field from `params.metadata` becomes a field of the request, searching the parsed object rather than grepping for a string. The end-to-end half asserts the receipt names the `IdentityProvider`'s principal and that the payload's name reaches no receipt and no event. Mutated: `agent_id` read out of the bag, both fail. **T502 — and the audit changed the answer.** Two of its four rows already existed under their own numbers (`test_T461...`, `test_T462...`), which is §9.4's defect in another place: a table that describes the tree, checked by a human reading both. `T502a` is the resumed *observed* receipt's spend, which `T439` and `T447` cover separately and neither covers together. `T502b` is the doubled `ACTION_DENIED`, the one row with no test under any name. **T502a's first version asserted the opposite of the contract and was wrong.** It read an empty ledger as meaning an observed resumed receipt should report no spend. §4.2.1a is explicit: every number on an observed receipt is a counterfactual, and without it nothing records what the action would have cost, so a budget cannot be sized from an observed run. The code was right. **T502b's first version was green against its own mutation.** It filtered on `budget_exhausted`, and `announce` guards the *unmeasurable* refusal, so the scenario never reached the guarded line. Rebuilt on a negative amount. Mutated: `announce` ignored, T502b fails. Full gate: all checks passed. Signed-off-by: arpan <contact@arpanghoshal.com>
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 14, 2026
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.
#190 merged the first commit of its branch; this is the second, pushed a few minutes later. It
is the whole of the build-and-close work. Pairs with ctrlrun-docs#25, which carries the API page
and the count.
#190 recorded three unshipped
SPEC-v0.10 §9names and left them. That was the wrong instinct.A gap that can be closed is closed; only the one whose name was wrong and whose reason was
right stays as a row.
hop=/task=onctrlrun.adapter.needs_approvalctrlrun.hop/v1's key set (§6.2)ssl_context=ongateway.transport.requestneeds_approval, a behaviour fix, not a doc fix(control, action, arguments, *, resource=None, task=None, hop=None), both threaded intoControl.evaluate.Without them the predicate evaluated against the receiver's whole candidate set while
executeevaluates against the hop alone (§2.3, no fallback). It answered "a human is needed" for a call
executethen refuses: the framework surfaces an approval item, a human says yes, the call failsanyway.
It was never an authority hole:
Control.executeis the enforcement point and refuses eitherway, so nothing wider ever ran. What it cost was the framework's own approval item and a receipt
nobody could explain. Said plainly, because "a frozen API row didn't ship" reads worse than it was.
T128cdrives the predicate andexecuteover one hop and asserts they agree. The no-hop case isits negative control, so the fixture cannot be one where everything is denied anyway (mutation
pattern 3). Mutated back to the old call: fails.
ctrlrun.hop/v1, the table listed eight of eleven keysschema,root_idandmissing_parent_idwere emitted for a whole milestone while §6.2 described asmaller shape. Under-describing is the safe direction for a reader and the wrong one for a schema
somebody writes a consumer against. Not re-cut, because nothing it emits changed.
T506bparses the table out ofSPEC-v0.10.mdand compares it to the emitted document. Mutated: onerow deleted from the spec, T506b fails naming it.
T480, both halves
params.metadatabecomes a field of the request, asserted overthe parsed object's attributes rather than by grepping for a string.
IdentityProvider's principal, and the payload's chosen namereaches no receipt and no event.
It held by construction before, so this is the regression guard for a property that was true and
untested. Mutated:
agent_idread out of the bag, both halves fail.T502, the audit changed the answer
Two of its four rows already existed under their own numbers (
test_T461...,test_T462...).That is §9.4's defect in another place: a table describing the tree, checked by a human reading both.
My earlier report called T502 uncovered; it was half covered, under other names.
T502a, the resumed observed receipt's spend.T439covers observe,T447covers resume,neither covers the two together.
T502b, the doubledACTION_DENIEDon a resumed observed leg. The only row with no testunder any name, and absent-shaped for a reason worth keeping: every assertion near it checked the
event appeared, and an event that appears twice appears.
Two of these tests were wrong first, and the mutation is what said so
T502aasserted the opposite of the contract. It read an empty ledger as meaning an observedresumed receipt should report no spend.
§4.2.1ais explicit: every number on an observed receipt isa counterfactual, and without it nothing records what the action would have cost, so a budget
cannot be sized from an observed run, the entire reason to run one. The code was right; I nearly
"fixed" it.
T502bwas green against its own mutation. It filtered onbudget_exhausted, andannounceguards the unmeasurable refusal, so the scenario never reached the guarded line. Rebuilt on a
negative amount; now fails when
announceis ignored.Full gate: all checks passed.
Not merging.