Item 5: the operator surfaces for a hop - #179
Merged
Merged
Conversation
SPEC-v0.10 section 6. No new command: v0.9 section 7.1's reasoning applies unchanged, and a hop is one more thing inspect answers about. ctrlrun inspect --hop emits ctrlrun.hop/v1, its own document rather than a key inside ctrlrun.inspection/v2 on v0.9 section 10.1's argument: that one answers about an action and this answers about an authority record, and a reader handed one would have to know which shape it got before it could read either. It answers about a hop and an ordinary delegation alike, because an operator paged about a refusal does not yet know which they have. narrowed_dimensions is the helper section 6.2 needs and the tree did not have. contained_dimension computes the complement: the first row a child VIOLATES, or None where it is contained. What an operator reading a refused chain needs is which link took the resource away, and nothing answered it. It is a reporting helper that decides nothing, which is the line that keeps section 2.2's one-relation rule intact. Every refusal that has an id prints ctrlrun inspect --hop with it filled in, and the argument is always the PRESENTED hop. An earlier draft of section 6.3 printed the id missing_parent_id names; that id is by construction the record the store could not read, so the suggested command is the unknown-id path and exits non-zero. A refusal whose one suggestion is guaranteed to fail is worse than none, because it teaches an operator the line is noise. The unreadable id goes in the prose beside it. Mutation table in the PR body. Both mutations SURVIVED the first pass, and for the same reason: every test covered the healthy chain. Reading depth from the stored column agrees with the walk on any chain Control.hop built, and printing the missing ancestor agrees with printing the presented hop when nothing is missing. The two cases that discriminate both require editing the store the way a text editor would, which is the threat v0.3 section 5.5 and section 5.6 rule 1 exist for, so the tests now do the editing. Both caught on the re-run. Gate with Postgres: 4426 passed, 0 skipped. Signed-off-by: arpan <contact@arpanghoshal.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
rohanrkamath
merged commit Sep 13, 2026
170d45e
into
v0.10/4-one-ordered-list
15 of 16 checks passed
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.
Item 5 of v0.10,
SPEC-v0.10 §6. Stacked on #178.No new command.
v0.9 §7.1's reasoning applies unchanged, and a hop is one more thinginspectanswers about.
What lands
ctrlrun inspect --hop <id>emitsctrlrun.hop/v1— its own document rather than a key insidectrlrun.inspection/v2, onv0.9 §10.1's argument: that one answers about an action, thisanswers about an authority record, and a reader handed one would have to know which shape it
got before it could read either. It answers about a hop and an ordinary delegation alike, because
an operator paged about a refusal does not yet know which they have.
narrowed_dimensionsis the helper §6.2 needs and the tree did not have.contained_dimensioncomputes the complement: the first row a child violates, orNonewhere it is contained. What an operator reading a refused chain needs is which link took the
resource away, and nothing answered it. It is a reporting helper that decides nothing, which is
the line that keeps §2.2's one-relation rule intact.
§6.3: the refusal prints its own command, with the argument filled in — and the argument is
always the presented hop. An earlier draft printed the id
missing_parent_idnames; that id isby construction the record the store could not read, so the suggestion is T504's unknown-id path
and exits non-zero. A refusal whose one suggestion is guaranteed to fail is worse than none. The
unreadable id goes in the prose beside it.
Mutation table
depthread from the stored column instead of walkedBoth survived the first pass, for the same reason: every test covered the healthy chain.
Reading
depthfrom the column agrees with the walk on any chainControl.hopbuilt, and printingthe missing ancestor agrees with printing the presented hop when nothing is missing.
The two cases that discriminate both require editing the store the way a text editor would —
which is precisely the threat
v0.3 §5.5("a row edited directly in the database cannot assert itsway to a shorter chain") and
v0.3 §5.6rule 1 exist for. So T503b updates thedepthcolumnbehind the store's back and asserts the view still walks; T505c deletes a parent row and asserts the
printed command names the leaf, not the hole. Both caught on the re-run.
That is the third time in this milestone a guard looked tested and was not, and each time the
missing case was the adversarial one rather than the ordinary one.
Gate
4426 passed, 0 skipped with Postgres.
ruff,mypy --strictclean.Still outstanding for the release item
ctrlrun scannaming principals who hold a root grant) is not in this PR. It is theoperator's half of §2.3.2's deployment rule, and it belongs with
scan's own surface rather thanwith
inspect's; the release item owns the exit criteria that reference it. Flagged rather thansilently dropped.
policy_unapproved, which is not what item4 shipped or needed. The spec owes that correction and I will carry it in the release pass.
there.
Not merging and not tagging.