fix(roles): first releases are management's; external-only decides nothing #101

Merged
sharang merged 1 commits from fix/role-dataset-authority-rules into main 2026-10-28 16:13:09 +00:00
Owner

Closes the two registry gaps noted in the S0 stage check (section 8).

  • First releases are management's (A2 §1): an authority for r1.release_d01 or r1.release_d02 must name Management. Otherwise the save is refused with 400 first_release_management. Until now only the portal enforced this. The registry pinned only the R1-D02 update (B8).
  • External-only decides nothing (BM-4): a function held only outside the company (External == ExternalOnly, currently the external cybersecurity provider) is refused as the deciding function. It returns 400 external_decides in both the authority and the immediate authority. The portal no longer offers it since #114/#116.

There is no migration and no API shape change. A stored dataset that already holds such an entry would have every later save refused until that entry is corrected. Prod has no S0 data, and the portal has not offered either option since #114/#116.

Tests: TestValidate_whoDecides covers both codes, an unknown immediate function and a positive case. go vet and go test ./... pass, with roles coverage at 74.3 %.

🤖 Generated with Claude Code

https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf

Closes the two registry gaps noted in the S0 stage check (section 8). - **First releases are management's (A2 §1):** an authority for `r1.release_d01` or `r1.release_d02` must name Management. Otherwise the save is refused with 400 `first_release_management`. Until now only the portal enforced this. The registry pinned only the R1-D02 update (B8). - **External-only decides nothing (BM-4):** a function held only outside the company (`External == ExternalOnly`, currently the external cybersecurity provider) is refused as the deciding function. It returns 400 `external_decides` in both the authority and the immediate authority. The portal no longer offers it since #114/#116. There is no migration and no API shape change. A stored dataset that already holds such an entry would have every later save refused until that entry is corrected. Prod has no S0 data, and the portal has not offered either option since #114/#116. Tests: `TestValidate_whoDecides` covers both codes, an unknown immediate function and a positive case. `go vet` and `go test ./...` pass, with roles coverage at 74.3 %. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-10-28 15:47:59 +00:00
fix(roles): first releases are management's; external-only decides nothing
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 24m31s
ci / image (pull_request) Skipped
a6b8af4c6a
Two rules the portal already keeps, now in the registry too:
- authority for r1.release_d01 and r1.release_d02 accepts only management
  (A2 §1), code first_release_management;
- a function held only outside the company is no deciding function, in
  authority or immediate authority (BM-4), code external_decides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang merged commit 5fff4dd581 into main 2026-10-28 16:13:09 +00:00
sharang deleted branch fix/role-dataset-authority-rules 2026-10-28 16:13:09 +00:00
Sign in to join this conversation.