Repository navigation
CONTRACT: reject ambiguous proposed policy frontmatter - #4016
Conversation
|
Collision review for head e206665: the PR-mode check reports closure overlap with #3056, #3059, #3069, #3116, #3437, #3581, #3622, #3806, #4002, #4007, #4008, #4012, #4013, with no path or unknown reports. The initial cited-path check separately identified policy-proposal.ts overlap with #3622. This PR changes only proposal-specific delimiter validation there; no other branch was edited. Citation maintenance also touches documentation present in #4002. The refreshed local receipt records main 5af6897. |
|
Collision review for head 130ad79: 0 path/unknown reports; closure overlap with #3056, #3059, #3069, #3116, #3437, #3581, #3622, #3806, #4002, #4007, #4008, #4012, #4013, #4018. Earlier cited-path overlap with #3622 and documentation overlap with #4002 remain scoped as recorded above. Final local preflight passed on this head. |
|
Collision review for head 674b88c: no path/unknown reports; closure overlap with #3056, #3059, #3069, #3116, #3437, #3581, #3622, #3806, #4002, #4008, #4012, #4013, #4018, #4020, #4021. Main c0bce42 merged cleanly; fresh local preflight passes all gates and 797 invariants. Earlier source overlap with #3622 and documentation overlap with #4002 remain scoped as recorded. |
|
Collision review for head 674b88c: 0 path/unknown reports; closure overlap with #3056, #3059, #3069, #3116, #3437, #3581, #3622, #3806, #4002, #4008, #4012, #4013, #4018, #4021, #4022. Main advanced only through #4020 CI tooling, with no overlap in this PR files. Merged origin/main and retained the actual prior local receipt at head 674b88c; no claim that it tested this newer combined tree. Candidate confirmation must prove the refreshed candidate. |
|
Delivered in PR #4016, squash New proposed policy bytes require closed standalone frontmatter fences before approval and at publication revalidation. Accepted BOM/line-ending/EOF/whitespace forms preserve exact bytes, and valid replacements can repair old ambiguous policies without changing shared parser semantics. The contract, decision record and breaking minor changeset carry the approved 0.45.0 migration guidance. Evidence:
PR and closed issue retain milestone 0.45.0. No dependent blocked issues or review findings remain. Follow-up #4017 records the observed temporary-storage quota failure and separate successful recovery; it has no release milestone. Nothing remains in this implementation's scope. |
Closes #3666
What changed
Hosted
propose_policy_changerejects unclosed or suffixed proposed frontmatter before requesting approval or persisting an actionable review. Standalone fences preserve BOM, LF/CRLF, trailing spaces/tabs, EOF closers and exact publication bytes. Valid replacements can repair old ambiguous policies with parser-aligned review.Why this shape
The maintainer approved this pre-1.0 breaking input narrowing for 0.45.0 in #3666. The proposal service inspects only
frontmatterBlockoffsets, leaving shared parser semantics and old-file review intact. Schema and strict boundary validation run together initially and at publication. The minor changeset includes migration guidance.Proof
bun run test packages/ui-server/tests/policy-proposal.test.tsfailed five named rejection cases with “Expected promise that rejects / Received promise that resolved.” Both real-service bridge cases also failed on that assertion before implementation.proposalBoundaryErrorcaused eight failures: the five rejection cases, publication revalidation, and Claude/Pi pre-permission bridge rejection. Restoring the guard passed all 57 proposal/bridge tests (524 assertions).NODE_OPTIONS=--max-old-space-size=8192 bun run typecheckpassed. The default 2 GiB Node heap exhausted memory first.origin/mainproposal source. No passing local provider-runtime proof is claimed; hosted runtime proof remains necessary.changeset statuspassed; all planned bumps are minor, none major.c0bce42e7730f565cc1dac43aca4aea6eaf84675(index publication fix fix(ui-sdk): a read-only index connection no longer refuses native publication #4011 and identity-gate fix fix(ui-sdk): keep a separate-identity payload out when its coordinator dies before release #4007); documentation citation edits merged cleanly.check:prpassed all gates and 797 fast invariant tests using an ownedTMPDIRon adequately provisioned storage. The preceding shared-temp run failed with git fixture disk quota errors; ci: diagnose temporary-storage quota failures cascading through local fast invariants #4017 tracks diagnosis without a release commitment. Receipt below.{"version":1,"kind":"brain-check-pr-receipt","head":"674b88c5b66a114965fd26578598b019eca48575","base":"origin/main","mode":"focused","startedAt":"2026-11-15T14:51:24.262Z","finishedAt":"2026-11-15T14:52:44.546Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14325.823680000001},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":126.04588000000149},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":69.69724599999972},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":18.372113999997964},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":65726.83632999999}]}Guard containment
The trigger is an ambiguous newly proposed frontmatter boundary; schema, authority and filesystem failures retain their existing handling. Only that proposal is refused, since an actionable policy approval cannot safely proceed with ambiguous delimiters. Read-only review of existing files remains available. Submitting a corrected proposal automatically clears the refusal without restarting or disabling a chat/backend. The validation error explains the cause in the tool result; no pending approval is retained. Service repair tests and both bridge tests prove a refused request leaves subsequent valid requests usable.
Checklist
Anything left open
Nothing in implementation scope. This host cannot execute native provider-history guards; automatic hosted proof must establish runtime results.