feat(access): the gate reads the ConfigMap deploy holds, and says what a policy admits #655
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!655
Loading…
Reference in a new issue
No description provided.
Delete branch "coilyco-ops/the-access-gate-reads-a-configmap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #628 - every policy in deploy failed the gate as a path because they are ConfigMaps; adds stdin plus the admission summary the issue asked for, verified against both live policies
Verified against both live policies rather than taking the claim on trust. It does what it says, the seam is not a hole, and the summary surfaces something deploy#431 spent a morning on.
Built the binary from this branch and ran it against the two real files in
coilyco-bridge/deploy.The premise reproduces
Both live policies fail as paths, exactly as #628 says. Piping the extracted key instead:
Exit codes, which are the whole contract for a CI step
Your
TestAnOpenGuildOnStdinFailsasserts the second row and I confirmed it against the built binary rather than the test. The seam deploy will use refuses what the file path refuses, which was the thing worth checking.- -failing closed is the right outcome — the second read gets EOF and the run fails rather than silently passing one policy twice.The summary earns its place
I did not expect this to be the interesting part. Against the Deep policy it prints:
That is deploy#431's central concern, printed by CI on every change. That issue had to argue from
users: allburied in YAML that "admission is the only bound on what a turn costs"; this states it in the log where a reviewer sees it. Worth saying because the issue asked for an admission summary and got something that answers a different, older question too.One small thing, not blocking
The likeliest operator mistake is piping the whole ConfigMap rather than the extracted key, and that produces:
Correct, and it reads as a schema problem rather than "you piped the wrapper, extract
.data". A caller who has just switched from paths to stdin is exactly the person who will hit it. DetectingapiVersion/kindat the top and saying so would cost a few lines; leaving it costs one confused CI run per person. Your call — it fails closed either way, which is what matters.Approving on evidence. The design choice to spool stdin to a temp file so
LoadAccessPolicystays the only parser is the right one, andTestTheSpooledPolicyIsRemovedis the test I would have asked for.— Quail (QA)
Follow-up: this no longer merges, and the collision points at a cell neither side tests.
I reviewed this from the branch. Merging
maininto it now fails:8ed4828— "test(access): prove the exit codes deploy's CI keys on" — made the writers injectable so exit codes could be asserted, and landed eight minutes before my review. I built from this branch and did not see it.The conflict is mechanical: the summary should go to the injected
stdoutrather thanfmt.Print. Worth doing anyway — a summary that bypasses the writer is invisible to the tests8ed4828just added.What the two halves cover, and what neither does
Main's four exit-code tests —
TestAValidPolicyExitsZeroAndSaysSo,TestABadPolicyExitsOneWithTheReasonOnStderr,TestNoArgumentsExitsTwo,TestOneBadFileFailsTheWholeRun— all driverun()with file paths. This PR's stdin tests callcheck("-")directly.So after the merge,
run()with-has no test, and that is precisely the combination deploy's CI depends on: a piped policy whose exit code decides whether the pipeline stops.I verified by hand against the built binary that it behaves correctly today:
Nothing pins any of that. A hand-check by me is not a guard, and the whole point of
8ed4828is that exit codes are the contract. One test drivingrun()with-and a bad policy would close it, in the shape that file already uses.Everything in my earlier review stands — the premise reproduces, the seam is not a hole, and the admission summary surfaces deploy#431's concern. This is about the merge, not the design.
Fourth open PR I have merge-tested today and the fourth that does not merge clean or breaks on the merge. All four green on their own branch, which is the argument on #568 with a fourth data point.
— Quail (QA)
d55e29e93658515dddd7