Skip to content

Propose the neutral standing-policy compliance contract - #349

Merged
brettheap merged 17 commits into
mainfrom
change/add-standing-policy-compliance-contract
Aug 26, 2026
Merged

brettheap merged 17 commits into
mainfrom
change/add-standing-policy-compliance-contract

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Summary

  • propose the neutral intent-compliance capability ruled by Brett Heap on 2026-08-24
  • define authority-bound veto vocabulary, loud compliance decisions, and a central revocable policy-allowance registry
  • require a permanent deterministic pre-dispatch floor with bounded-classifier escalation only for ambiguity/sensitive paths
  • name codexFactory add-intent-compliance-gate as the first conforming realization and FEAT-003 as its regression

Decisions carried

  • D1: neutral-first openxFactory contracts; codexFactory first conformer
  • D2: deterministic evaluation every dispatch plus one bounded classifier escalation
  • D3: permanent floor beneath live Hermes intake
  • D4: evidence recorded for every outcome
  • D5: central revocable allowance registry; bindings reference IDs and re-resolve at dispatch/admission

Validation

  • OPENSPEC_TELEMETRY=0 openspec validate add-standing-policy-compliance-contract --strict
  • OPENSPEC_TELEMETRY=0 openspec validate --all --strict — 76/76 passed

Sequencing

This is exit 1. codexFactory add-intent-compliance-gate is exit 2 and remains sequenced after the neutral contract release.

Closes the neutral-contract half of opensoft/codexFactory#3.

Copilot AI lite review requested due to automatic review settings August 25, 2026 14:19

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

brettheap and others added 6 commits August 25, 2026 10:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR proposes a neutral intent-compliance OpenSpec contract for standing-policy evaluation, deterministic enforcement, allowance management, and future codexFactory realization.

Changes:

  • Defines compliance decisions, policy allowances, registry resolution, and revocation.
  • Specifies deterministic pre-dispatch enforcement with bounded classifier escalation.
  • Adds proposal, design, specification, tasks, metadata, and README registration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Summary
README.md Registers the active OpenSpec change; no final comments.
openspec/changes/add-standing-policy-compliance-contract/tasks.md Sequences realization work; concrete codexFactory policy classes should remain domain-owned.
openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md Defines the compliance contract; evidence must be bounded/redacted, and classifier limits and fail-closed behavior require explicit machine-checkable constraints.
openspec/changes/add-standing-policy-compliance-contract/proposal.md Defines scope and provenance; the referenced origin path must be resolved or replaced.
openspec/changes/add-standing-policy-compliance-contract/design.md Documents architecture and decisions; no final comments.
openspec/changes/add-standing-policy-compliance-contract/.openspec.yaml Declares change metadata; no final comments.
Suppressed comments (6)

openspec/changes/add-standing-policy-compliance-contract/proposal.md:3

  • release-realization defines target_release as implemented or a named release (openspec/specs/release-realization/spec.md:7-12); implementation_pending is neither. This active proposal therefore introduces another nonconforming realization-axis value, while the existing release record explicitly says the axis does not define this token. Use the governed release identifier, or amend/rule the active-phase vocabulary before adding another use.
target_release: implementation_pending — requirements land now; post-ratification realization cuts the next additive contract bundle, allocated fresh per `docs/contract-versioning-policy.md`

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:149

  • The lockstep rule compares only the evaluated-content digest and allowance IDs. It therefore permits approval, dispatch, and admission decisions for the same content/IDs to use different vocabulary or policy-source digests, and gives no immutable registry snapshot or allowance-record digest with which to prove the “current” resolution. Bind every enforcement-point decision to a canonical content digest, the vocabulary/policy-source digest, and a registry revision plus resolved allowance-record digests; otherwise policy drift can be accepted as lockstep.
openxFactory SHALL require intent approval, pre-dispatch evaluation and
post-build admission to bind decisions to the evaluated-content digest and to
resolve the same allowance identifiers against current registry state. A
decision for a different digest or stale allowance state SHALL NOT authorize
the next enforcement point.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:9

  • stable identifier does not require uniqueness within a vocabulary. Two class entries could therefore share one ID, leaving allowance coverage and decision findings ambiguous even though the registry itself requires unique allowance IDs. Make class IDs unique within each vocabulary and validate duplicate IDs.
a stable identifier and declares the authority allowed to issue allowances for

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:71

  • Bindings and decisions are described as carrying only an allowance identifier, but uniqueness is stated only within a registry and the design intentionally leaves registry instances to consuming runtimes. If two registries contain the same ID, an enforcement point cannot deterministically know which current state to resolve. Require each reference to carry a registry identity/version, or make allowance IDs globally namespaced, while still forbidding embedded payloads.
openxFactory SHALL define a governed policy-allowance registry with unique
allowance identifiers, registry identity/version and deterministic lookup.
Bindings and decision records SHALL reference allowance identifiers and SHALL
NOT embed copied allowance payloads as authority evidence.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:90

  • Allowance records have a scope, and later resolution must block an allowance that is out of scope, but neither this requirement nor task 3.2 defines the scope shape or how it is compared with the evaluated intent (for example, exact match versus action/resource containment). A canonical validator cannot determine covers or out of scope consistently, so consumers can make different authority decisions while both conform. Define a neutral matching rule or require a domain-owned scope verdict in the resolution evidence.
openxFactory SHALL require every evaluation point to resolve allowance
references against current registry state. An unreadable, absent or ambiguous
reference SHALL produce `needs_human_review`; a resolved allowance that is
revoked, expired, out of scope or issued by unauthorized authority SHALL
produce `block`.

openspec/changes/add-standing-policy-compliance-contract/tasks.md:28

  • Because Section 4 cuts a contract bundle, the realization tasks need to require contract_schema_version as well as the record envelope's schema_version. The versioning policy requires contract_schema_version on every contract file (docs/contract-versioning-policy.md:12-16), and existing schemas carry both fields. With the current wording, an implementation can satisfy the checklist while omitting the version identity required for release pinning and validation; add the field and define its relationship to schema_version.
- [ ] 2.2 Encode closed decision outcomes, stable allowance IDs, immutable
      approval facts, additive revocation facts and unique registry lookup.
- [ ] 2.3 Require bindings/decisions to carry allowance IDs only and reject
      embedded allowance payloads as authority evidence.
- [ ] 2.4 Add `.template.yaml` files for all four record kinds and ensure every

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

target_release: implementation_pending — requirements land now; post-ratification realization cuts the next additive contract bundle, allocated fresh per `docs/contract-versioning-policy.md`
Status: draft
Proposed: 2026-08-24
Origin: codexFactory issue #3 + `ideation/staging/front-end-compliance-gates/`; decisions D1-D5 ruled by Brett Heap 2026-08-24

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 56484f0: Origin now names the durable cross-repo source and exact codexFactory commit (opensoft/codexFactory:ideation/staging/front-end-compliance-gates/front-end-compliance-gates.md@2fae181).

Comment on lines +28 to +32
openxFactory SHALL define a compliance-decision record with a closed outcome
of `allow`, `block`, or `needs_human_review`, plus the evaluated-content digest,
evaluator identity/version, class findings, rationale, policy source,
allowance-reference resolution facts, correlation identifiers and evaluation
time. Every evaluation SHALL emit the record, including `allow` outcomes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 56484f0/aad3b577: decision evidence is now bounded and redacted; raw intent/provider payloads, tenant content and credentials are expressly prohibited and validation-failing. Correlation facts are bounded opaque references.

Comment on lines +125 to +129
openxFactory SHALL permit a consuming domain to invoke one bounded classifier
only after deterministic evaluation marks ambiguity or a declared sensitive
surface. Classifier cost/turn limits and version SHALL be recorded, and its
output SHALL NOT erase a deterministic class finding or authorize an
allowance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 56484f0/aad3b577: the limit envelope is machine-checkable (one invocation/turn, 65,536 input bytes, 8,192 output bytes, 4,096 output tokens, 60 seconds). Missing limits, breach, timeout or invocation error fail closed to needs_human_review with no dispatch.

Comment on lines +30 to +32
- [ ] 2.5 Add a codexFactory-shaped first-conformer vocabulary example carrying
the five ratified standing-policy classes without making those five the
neutral closed set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aad3b57: the neutral packet now uses shape-only placeholder examples. The concrete five-class vocabulary and evidence moved to codexFactory successor task 5.1.

Copilot AI review requested due to automatic review settings August 25, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Suppressed comments (7)

openspec/changes/add-standing-policy-compliance-contract/design.md:106

  • Requirement 7 says classifier cost/turn limits and version SHALL be recorded, but the record-family definition and task 3.3 never define fields for the classifier invocation, its limits, or actual consumption. The eventual validator therefore has no stable shape to check, allowing consumers to emit incompatible evidence or omit it. Define the classifier-evidence fields in the compliance-decision contract and cover them in the validator fixtures.
3. `policy-allowance-registry` — registry identity/version and allowance
   collection, with unique IDs and deterministic resolution semantics.
4. `compliance-decision` — evaluated-content digest, evaluator/version,
   findings, allowance references/resolution facts, outcome and correlation.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:90

  • This requirement specifies how revoked, expired, out-of-scope, or unauthorized allowances block, but never specifies the outcome when a veto class is covered by a current, in-scope, unrevoked allowance. That behavior is nevertheless promised by tasks 3.4/5.4 and the README as current-allowance allow, so a conformer can satisfy this spec while still blocking (or reviewing) the valid-exception case. Add an explicit allow scenario and define precedence when any finding remains uncovered.
openxFactory SHALL require every evaluation point to resolve allowance
references against current registry state. An unreadable, absent or ambiguous
reference SHALL produce `needs_human_review`; a resolved allowance that is
revoked, expired, out of scope or issued by unauthorized authority SHALL
produce `block`.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:129

  • The design calls the classifier fail-closed, but the normative requirement only limits when it may run and what it cannot override; it does not define the outcome or evidence when the classifier is unavailable, times out, or exceeds its bound. On an ambiguous intent with no deterministic finding, that omission leaves an implementation path to allow. Promote the fail-closed result (for example, needs_human_review) into the requirement and add a failure-path fixture.
### Requirement: Bounded classification only escalates deterministic evaluation

openxFactory SHALL permit a consuming domain to invoke one bounded classifier
only after deterministic evaluation marks ambiguity or a declared sensitive
surface. Classifier cost/turn limits and version SHALL be recorded, and its
output SHALL NOT erase a deterministic class finding or authorize an
allowance.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:32

  • Every evaluation is persisted, but rationale and class findings have no reference-only or redaction constraint. An intent containing a token or raw provider payload could therefore be copied into a durable compliance decision while satisfying every listed field, contrary to the repository's raw-credential storage boundary. Constrain decision evidence to redacted/reference/digest forms and add a negative validation case covering all evidence fields.
openxFactory SHALL define a compliance-decision record with a closed outcome
of `allow`, `block`, or `needs_human_review`, plus the evaluated-content digest,
evaluator identity/version, class findings, rationale, policy source,
allowance-reference resolution facts, correlation identifiers and evaluation
time. Every evaluation SHALL emit the record, including `allow` outcomes.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:90

  • “Absent reference” conflicts with the preceding no-allowance scenario: no reference covering a veto class must yield block, while a claimed ID missing from the registry must yield needs_human_review. As written, consumers can legitimately choose either outcome for the same no-allowance case. Distinguish an unclaimed class from an unresolvable claimed identifier.
openxFactory SHALL require every evaluation point to resolve allowance
references against current registry state. An unreadable, absent or ambiguous
reference SHALL produce `needs_human_review`; a resolved allowance that is
revoked, expired, out of scope or issued by unauthorized authority SHALL
produce `block`.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:71

  • The unconditional SHALL reference allowance identifiers conflicts with the required no-class allow fixture (tasks 3.4), where no allowance exists, and with the no-allowance block scenario. A conforming validator could reject those valid cases merely because the ID list is empty. Qualify this to bindings and decisions that claim an allowance.
Bindings and decision records SHALL reference allowance identifiers and SHALL
NOT embed copied allowance payloads as authority evidence.

openspec/changes/add-standing-policy-compliance-contract/tasks.md:47

  • Requirement 5 explicitly blocks expired and out-of-scope allowances, and Requirement 8 blocks a decision/content digest mismatch, but the planned negatives list only revoked/unauthorized and stale policy-digest cases. The validator could omit these comparisons while every listed fixture passes. Add indexed negatives for both allowance cases and the evaluated-content digest mismatch.
- [ ] 3.5 Add negative examples for duplicate IDs, embedded allowance payloads,
      unauthorized issuers, stale policy digests, missing evidence fields and
      classifier override of a deterministic finding.

Comment on lines +1 to +2
schema: spec-driven
created: 2026-08-25

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in df7ec1d: .openspec.yaml now carries one explicitly approved ad_hoc origin because the durable staged source is cross-repo, pinned to codexFactory commit 2fae181. proposal-support.py . verify add-standing-policy-compliance-contract passes.

Comment on lines +139 to +141
Rollback never means permitting unevaluated dispatch. A consumer unable to
read the contract parks work for human review while returning to the prior
released bundle.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e715ccc: rollback now parks/denies until a compatible evaluator is restored; a bundle predating the deterministic floor is explicitly ineligible.

Comment on lines +70 to +71
Bindings and decision records SHALL reference allowance identifiers and SHALL
NOT embed copied allowance payloads as authority evidence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: copied/embedded allowance payloads are unconditionally forbidden under any authority, diagnostic or evidence field.

Comment on lines +48 to +52
openxFactory SHALL define a policy-allowance record with a stable identifier,
covered veto class and scope, cited policy approval, issuer identity and
authority, approval time, validity bounds and additive revocation state.
Approval facts SHALL be immutable; revocation SHALL append who revoked, when
and why without rewriting the original approval.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e715ccc/5077db17: approval is an immutable content-addressed record; revocation is a separate content-addressed predecessor-linked event; registry revisions are append-only and prior-state validated.

Comment on lines +145 to +149
openxFactory SHALL require intent approval, pre-dispatch evaluation and
post-build admission to bind decisions to the evaluated-content digest and to
resolve the same allowance identifiers against current registry state. A
decision for a different digest or stale allowance state SHALL NOT authorize
the next enforcement point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: a dedicated normative requirement now prohibits status: approved until a current digest-bound compliance outcome is allow.

Comment on lines +16 to +18
- **WHEN** a veto-class vocabulary record is validated
- **THEN** its declared policy source and digest resolve to the ratified authority it claims
- **AND** every class has a stable identifier and declared allowance issuer authority

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e715ccc/5077db17: policy reference shape is repository/path/immutable revision plus SHA-256 policy and ratification-record digests; consuming-domain resolution of exact git blobs is mandatory.

Comment on lines +38 to +40
- [ ] 3.2 Validate source-reference/digest presence, class/issuer closure,
registry-ID uniqueness, allowance scope/validity, immutable approval
facts and additive revocation fields.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: validator task 3.2 now requires resolving and hashing exact policy + ratification blobs and rejects self-reported-only authority.

Comment on lines +26 to +27
- [ ] 2.3 Require bindings/decisions to carry allowance IDs only and reject
embedded allowance payloads as authority evidence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: task 2.3 now rejects ANY copied allowance payload regardless of claimed purpose.

Copilot AI review requested due to automatic review settings August 25, 2026 14:33
@brettheap

Copy link
Copy Markdown
Contributor Author

Addressed all 4 published Copilot comments and the 6 suppressed contract findings in commits 56484f0d and aad3b577: governed target release; durable provenance; unique class IDs; registry-qualified allowance references; policy/vocabulary + registry/allowance digest lockstep; domain-owned scope-verdict evidence; bounded/redacted evidence; machine-checkable classifier caps/failure posture; contract_schema_version; and removal of codexFactory-specific classes from the neutral corpus. Strict validation remains green: 78/78.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Suppressed comments (7)

openspec/changes/add-standing-policy-compliance-contract/.openspec.yaml:2

  • This packet's machine-readable origin is missing: .openspec.yaml contains only schema and created, while scripts/proposal-support.py:281-287 rejects a missing origin in strict per-change verification and docs/document-lifecycle.md:368-380 requires exactly one immutable origin. The prose Origin: in proposal.md is not read by that gate; add a staged/ad_hoc origin block with the required fields.
schema: spec-driven
created: 2026-08-25

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:10

  • The contract calls the policy reference a “source” and a “digest” but defines neither a machine-readable repository/path/revision reference nor the digest algorithm and encoding. That leaves validators unable to resolve the claimed ratified authority or compare bytes; the existing pinned-source contract requires source repository, revision, and content digest (openspec/specs/omnigent-domain-overlay/spec.md:14-17). Define this source-reference/digest shape before the schemas are implemented.
openxFactory SHALL define a machine-readable veto-class vocabulary record that
names its ratified policy source, records the source digest, gives every class
a stable identifier unique within that vocabulary and declares the authority
allowed to issue allowances for that class. The record MAY carry domain-owned

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:113

  • The proposal's README and task 3.6 explicitly promise that a current valid allowance passes, but this normative scenario only says it may satisfy the class. A conformer can therefore emit block or needs_human_review even when the allowance is authorized, current, in-scope, and covers the class. Make the outcome mapping mandatory.
- **WHEN** the domain scope resolver emits `covers` for the evaluated-content and allowance-scope digests
- **THEN** that allowance may satisfy its class if all other validity checks pass
- **AND** resolver identity/version and verdict are recorded in the decision

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:157

  • Hermes may add findings, but the contract defines no composition rule for its allow/block/needs_human_review result with the deterministic outcome. Only deterministic block precedence is stated, so two consumers can record different closed decisions for the same inputs (for example, deterministic allow plus Hermes review). Define outcome precedence and require all layer findings in the same decision.
#### Scenario: Hermes intake is live

- **WHEN** a consuming system adds live Hermes intake review
- **THEN** the deterministic pre-dispatch evaluation remains mandatory beneath it
- **AND** Hermes judgment may add findings but cannot erase a deterministic block

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:87

  • This requires every binding and decision to carry an allowance_id, but the same packet promises a positive no-class allow that has no allowance to reference (tasks.md:53-54). Without an explicit empty-reference representation, the schema cannot represent that fixture or distinguish it from a malformed reference. Scope the tuple to claimed allowances and define how a decision that needs none is encoded.
openxFactory SHALL define a governed policy-allowance registry with unique
allowance identifiers, registry identity/version, a monotonically identified
revision and deterministic lookup. Bindings and decision records SHALL carry a
registry-qualified reference `(registry_id, registry_version, allowance_id)`
and SHALL NOT embed copied allowance payloads as authority evidence.

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:37

  • The contract calls these values only "digests" and never fixes an algorithm, encoding, or canonical input bytes, yet Requirement 9 makes digest equality an authorization condition across three enforcement points. Different consumers can compute different identities for the same intent or record and either reject valid work or accept mismatched evidence. Specify and validate one canonical digest form and serialization before release.
openxFactory SHALL define a compliance-decision record with a closed outcome
of `allow`, `block`, or `needs_human_review`, plus the evaluated-content digest,
evaluator identity/version, class findings, rationale, policy source,
allowance-reference resolution facts, correlation identifiers and evaluation

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:167

  • The classifier path records output but does not define the outcome when the classifier itself reports a veto class. It only forbids erasing a deterministic finding or authorizing an allowance, so a conformer could emit allow for a classifier-positive sensitive intent without violating this requirement. Specify how a positive classifier finding enters class/allowance resolution (or explicitly routes to needs_human_review) and add the corresponding closed-outcome scenario.
openxFactory SHALL permit a consuming domain to invoke a classifier only after
deterministic evaluation marks ambiguity or a declared sensitive surface, with
exactly one invocation and one turn, no more than 65,536 input bytes, 8,192
output bytes, 4,096 output tokens and 60 seconds. Limits and classifier version
SHALL be recorded; missing limits, limit breach, timeout or invocation failure
SHALL produce `needs_human_review` and no dispatch. Classifier output SHALL NOT
erase a deterministic class finding or authorize an allowance.

Comment on lines +63 to +67
openxFactory SHALL define a policy-allowance record with a stable identifier,
covered veto class and scope, cited policy approval, issuer identity and
authority, approval time, validity bounds and additive revocation state.
Approval facts SHALL be immutable; revocation SHALL append who revoked, when
and why without rewriting the original approval.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: allowance approvals bind exact vocabulary identity/digest plus class ID; class reuse in another vocabulary cannot authorize it.

Comment on lines +83 to +87
openxFactory SHALL define a governed policy-allowance registry with unique
allowance identifiers, registry identity/version, a monotonically identified
revision and deterministic lookup. Bindings and decision records SHALL carry a
registry-qualified reference `(registry_id, registry_version, allowance_id)`
and SHALL NOT embed copied allowance payloads as authority evidence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e715ccc/5077db17: references now carry (registry_id, allowance_id); evaluation atomically reads CURRENT append-only revision and records its digest. Historical selection cannot satisfy evaluation.

Comment on lines +57 to +59
- **WHEN** an evaluator finds a veto class and no allowance reference covers it
- **THEN** it emits `block` with the class, policy source and rationale named
- **AND** approved intent is not treated as policy authorization

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5077db1: precedence is explicit — unclaimed veto blocks; claimed-but-unresolvable reviews; resolved invalid blocks; current covering allowance satisfies; final allow requires every finding covered.

Comment on lines +161 to +164
openxFactory SHALL permit a consuming domain to invoke a classifier only after
deterministic evaluation marks ambiguity or a declared sensitive surface, with
exactly one invocation and one turn, no more than 65,536 input bytes, 8,192
output bytes, 4,096 output tokens and 60 seconds. Limits and classifier version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e715ccc/5077db17: classifier trigger is closed (deterministic_ambiguity|policy_sensitive_surface); sensitive-surface use must reference/digest current vocabulary metadata, preventing blanket declaration.

Copilot AI review requested due to automatic review settings August 25, 2026 14:47
@brettheap

Copy link
Copy Markdown
Contributor Author

Second Copilot round addressed in df7ec1dd, e715ccc5, and 5077db17: machine origin gate, safe rollback, immutable approvals + separate revocation chain, current atomic registry revision, unconditional no-copy rule, vocabulary-bound classes, authoritative source resolution, explicit approval gate, closed allowance precedence, closed classifier triggers/results, canonical SHA-256/JCS digests, and deterministic/Hermes outcome composition. Validation: OpenSpec strict 78/78; proposal-support.py . verify add-standing-policy-compliance-contract passes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Suppressed comments (7)

openspec/changes/add-standing-policy-compliance-contract/design.md:108

  • The design calls this a four-artifact family and folds revocation into the policy-allowance, but the specification and tasks require a separate policy-allowance-revocation record. Implementing this section as written would omit the revocation schema/event and contradict immutable approval facts. List five record kinds and describe revocation as its own predecessor-linked artifact.
The realization produces four interoperable artifacts:

1. `veto-class-vocabulary` — policy-source reference/digest, class identifiers,
   unique-within-vocabulary class identifiers, owner/issuer roles and
   domain-declared detection metadata.

openspec/changes/add-standing-policy-compliance-contract/design.md:178

  • Migration step 2 repeats the four-artifact omission, so even if the record-family list is corrected, the release plan can still omit the standalone revocation schema/template required by §2.1/§2.4 and the separate-event requirement. The release scope must cover all five record kinds.
2. Realize and release the four record schemas/templates, validator and corpus

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:77

  • Because references contain only (registry_id, allowance_id) and evaluation uses the current revision, unique allowance IDs must be lifetime-scoped. As written, a later revision can repoint an old ID to a new approval after revocation, so the same reference would resolve as allowed and bypass the required revocation block. Require allowance IDs to never be reused across revisions.
openxFactory SHALL define a governed registry with stable registry identity,
append-only revisions linked by predecessor digest, unique allowance IDs and
atomic current-revision lookup. A claimed allowance reference SHALL contain
only `(registry_id, allowance_id)`; copied/embedded allowance payloads are
unconditionally forbidden. Decisions SHALL record the current revision digest

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:182

  • The contract requires a “closed result” and a result digest, but defines no finite classifier-result vocabulary or mapping. A conformer can emit an arbitrary value and still claim it is a negative or positive result, so validation cannot distinguish a safe no-veto result from an unknown or positive result. Define the allowed result enum and require every member, including unknown/error, to map to the stated outcome.
Decision evidence SHALL record trigger kind/reference/digest, model/version,
one-invocation/one-turn limits, maximum 65,536 input bytes, 8,192 output bytes,
4,096 output tokens and 60 seconds, actual consumption, closed result and
result digest. Missing/invalid trigger, blanket undeclared sensitivity, absent
limits, breach, timeout or invocation failure SHALL produce

openspec/changes/add-standing-policy-compliance-contract/specs/intent-compliance/spec.md:207

  • This enforcement-point binding omits the allowance reference set: it compares content/policy/vocabulary and registry identity, but not the (registry_id, allowance_id) claims or resolved approval digests across approval, dispatch, and admission. A consumer could approve under one allowance and dispatch under another in the same registry, bypassing revocation of the approved allowance. Require the identical allowance-reference set at each point while still re-resolving the current revision.
openxFactory SHALL require intent approval, pre-dispatch evaluation and post-
build admission to bind decisions to identical canonical content digest,
policy-source/vocabulary digest and registry identity, while each later point
atomically reads current registry revision and records resolved approval,
revocation and scope-verdict digests. Stale revision selection, digest mismatch

openspec/changes/add-standing-policy-compliance-contract/tasks.md:61

  • The spec's “declared ambiguity escalates once” scenario requires an accepted bounded-classifier path with a valid trigger, caps, actual consumption and recorded evidence, but the positive corpus only covers allowance/reference outcomes. Add a positive classifier-escalation fixture so task 3.9 proves this path rather than only testing classifier rejection cases.
- [ ] 3.7 Add packaged positive examples for no-class allow, current-allowance
      allow, ambiguous-reference review and revoked-allowance block.

openspec/changes/add-standing-policy-compliance-contract/tasks.md:66

  • These negatives omit distinct fail-closed/composition paths required by the specification: absent classifier limits, cap breach, timeout, invocation error, and a Hermes finding composed with deterministic findings. Because task 3.9 only proves the listed fixtures fail for their intended reasons, a validator could omit these branches and still pass its corpus. Add indexed fixtures asserting the required review/block outcomes and precedence.
- [ ] 3.8 Add negative examples for duplicate class/allowance IDs, ambiguous
      registry references, embedded allowance payloads, unauthorized issuers,
      stale policy/vocabulary/content/registry/allowance digests, expired and
      out-of-scope allowances, undefined scope verdicts, raw evidence, missing
      `contract_schema_version`, unbounded/blanket classifiers, classifier

Comment on lines +91 to +94
Allowances are first-class records; bindings carry a registry-qualified
reference `(registry_id, registry_version, allowance_id)`, never copied
payloads. Registry revisions and resolved allowance-record digests bind every
decision to the state it actually evaluated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: D5 now carries only (registry_id, allowance_id) and the design consistently requires current-revision lookup.

Comment on lines +55 to +57
bounds. Its canonical approval digest SHALL identify those facts. Revocation
SHALL be a separate content-addressed event targeting the approval digest and
linking its predecessor event/revision; approval facts SHALL NOT be rewritten.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: revocation events now bind revoking principal, authority role, and digest-bound authorization proof; validator tasks require authority closure, with an explicit invalid-authority scenario.

Comment on lines +157 to +161
openxFactory SHALL require deterministic compliance immediately before worker
invocation regardless of prior approval, classifier use or live Hermes review.
All deterministic, classifier and Hermes findings SHALL compose into one
decision under precedence `block > needs_human_review > allow`; no higher layer
may erase a deterministic block. Evaluation failure SHALL stop dispatch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: dispatch authorization is conditioned on the current registry-head digest and atomically compared at the worker-invocation linearization point. A racing head change invalidates dispatch and forces current-state re-evaluation; tasks include a runtime conformance fixture.

Comment on lines +40 to +41
- [ ] 3.1 Implement `scripts/validate-intent-compliance.py` with parse-once
typed validation for all four record kinds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: design and migration now enumerate five artifacts, and task 3.1 explicitly requires typed validation for the standalone policy-allowance-revocation event.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5077db173d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +91 to +92
Allowances are first-class records; bindings carry a registry-qualified
reference `(registry_id, registry_version, allowance_id)`, never copied

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the registry version from binding references

For every binding that claims an allowance, this tuple conflicts with the normative requirement and task 2.3, which permit only (registry_id, allowance_id) and require the evaluator to read the current revision. Implementing D5 as written therefore either produces bindings rejected by the planned closed contract or introduces a caller-supplied revision that can be mistaken for the lookup target, undermining the stated current-state/revocation semantics.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: the stale registry_version tuple was removed from D5; all allowance claims use (registry_id, allowance_id) and resolve current registry state.

Comment on lines +40 to +41
- [ ] 3.1 Implement `scripts/validate-intent-compliance.py` with parse-once
typed validation for all four record kinds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate all five record kinds

When the realization tasks are followed, the schema plan defines five record kinds, including a separate policy-allowance-revocation, but this task scopes typed validation to four. The design's four-item list confirms that the omitted kind is the revocation event by incorrectly folding revocation state into policy-allowance, despite the normative requirement that approval and revocation be separate records; this leaves the security-critical revocation record without an explicit typed-validation obligation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b9359f: all five record kinds are now listed in the design/migration, and task 3.1 explicitly validates the separate revocation event.

Copilot AI review requested due to automatic review settings August 26, 2026 04:47
@brettheap

Copy link
Copy Markdown
Contributor Author

Review-gap disposition in 0b9359fd:

  • removed stale registry_version binding references;
  • aligned design, migration, schemas/templates, and validator scope on five record kinds;
  • made allowance IDs registry-lifetime unique and non-reusable;
  • defined classifier results as no_veto_signal | veto_signal | indeterminate | error with closed outcome mapping;
  • required the identical canonically compared allowance-reference set at approval, dispatch, and admission;
  • added valid classifier-escalation fixtures for no-veto and veto-signal results;
  • added incorrect-mapping fixtures for absent limits, each cap breach, timeout, invocation error, deterministic override, allowance substitution, and Hermes composition;
  • additionally authenticated revocation authority and serialized dispatch against racing registry updates.

Validation after the final edit: openspec validate add-standing-policy-compliance-contract --strict passed; openspec validate --all --strict passed 78/78; proposal-support.py . verify add-standing-policy-compliance-contract passed; git diff --check passed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: codexfactory-4 (codeXfactory-4)

(Drafted by this lane under its former name, browser-ui-repair — retired 2026-09-14.)

codexFactory add-intent-compliance-gate (Speckit 044) reporting back on this
change's task 2 — discharging codexFactory's own ratified task 7.7 / Speckit
T067
: "Post the FEAT-003 evidence on openxFactory
add-standing-policy-compliance-contract as its task 2.3 discharge, and say
plainly whether task 2.2's admission clause is discharged or deferred."

What FEAT-003 is, for a reader who only has this proposal loaded: the
codexFactory reject-pilot this change's own design.md § Context cites — an
approved intent encoded unconditional external egress, passed deterministic
checks, got built, and was admitted with conditions by governed review, with all
three managers initially deferring to the approved intent; the back-end
standing-policy veto blocked the same candidate, but only after worker cost and
candidate creation. add-intent-compliance-gate re-runs it as a three-case
fixture regression proving the neutral floor now catches it BEFORE dispatch, at
the two enforcement points this realization ships. Task 2.3's own words — "FEAT-003
evidence for no allowance, current allowance and revoked allowance" — map onto
the three cases one for one (below).

Slice ledger — codeXfactory/codexFactory, every merge sha re-read from the
API, not carried from memory:

Slice PR Merge sha Merged (UTC)
Change ratified (review/ratification-2026-09-10.md) codeXfactory/codexFactory#343 3f051e69 2026-09-10T17:41:49Z
S1 — contract consumption, schema delta codeXfactory/codexFactory#364 1a98b2fe 2026-09-10T22:00:39Z
S2 — evaluator core, vocabulary, registry codeXfactory/codexFactory#371 a67fb0ae 2026-09-11T01:57:04Z
S3 — gate A, approval decision codeXfactory/codexFactory#380 3e11abab 2026-09-11T03:24:52Z
S4 — gate B, pre-dispatch step codeXfactory/codexFactory#388 ef180510 2026-09-11T11:14:14Z
S4 tail — trusted snapshot, caller chain codeXfactory/codexFactory#405 f4a3df7a 2026-09-11T15:55:24Z
S5 — the two ruled deferrals, guarded codeXfactory/codexFactory#400 7a3a410e 2026-09-11T17:05:09Z
S6 — FEAT-003 fixture corpus, golden negatives codeXfactory/codexFactory#401 2bb9dc5d 2026-09-12T14:53:02Z
S7 part 1 — realization measurements codeXfactory/codexFactory#445 52e202e4 2026-09-12T22:24:48Z
S7 part 2 — pre-gate grandfathering run (OQ-10 observed; row 4.8a path (i)) codeXfactory/codexFactory#462 2f12cc41 2026-09-13T08:12:21Z

Two aggregation (opensoft/xFactory) pin-syncs made these slices live at the
execution lane: #436 → f6068d9d (2026-09-11T11:19:50Z) moved the gitlink to
ef180510, live-ing S1–S4; #444 → 483ee8f8 (2026-09-12T16:35:59Z) moved it
to 2f2c4255, live-ing the S4 tail, S5 and S6. S7 part 1 and part 2 ship no
code — their whole surface is evidence/docs — so nothing about either needs to
be live for any of the below to hold.

The conformance-gate MODIFIED block (this repository's own capability,
re-verified at every level-up through the realization, most recently on the
shipped head): promoted blob d1d32f0c…, MODIFIED-block blob bc50f8a7… — all
three of the promoted spec's original scenarios kept, titles unchanged, two more
added (3→5 scenarios), zero dropped, byte-identical across every commit checked
(six readings, 2f2c4255 through the shipped head). Exactly one active change
in the whole corpus carries a conformance-gate delta at every reading taken —
this one.

The T065 ALLOW run — gate B proven live, not only validated statically: run
34707547849,
taken 2026-09-12 on Brett Heap's verbatim word "run the T065 allow run"
(17:12Z). The pre-dispatch step (Evaluate pre-dispatch intent compliance,
gate B) ran and succeeded, emitting decision codex.binding.t065_allow_001.dispatch
— outcome: allow, findings: [], rationale codex.rationale.no_veto_class_detected
— and the dispatch guard was evaluated: its own env: block carries OUTCOME: allow beside READY: false, so the compliance check passed (did not fire) and
the readiness check correctly fired, fail-closed exactly as designed:
::error::coding rider not ready; the lane fails closed (no hosted coding fallback). The run's conclusion is failure BY DESIGN — readiness was
deliberately forced false for 97 seconds so no worker token could be spent and
no patch produced. The companion BLOCK-half run (one showing a block refusing
dispatch) is still PENDING: it needs a live allowance to revoke, and minting one
is Brett Heap's act (runbook Act 2) — not something an agent can produce.

CI green at every S7 head checked, same script (scripts/validate-docs.sh),
validate job AND workflow both success at all four:

Run Head Result
34710657442 4d341ceb 5082 passed, 22 skipped + 462 passed
34711371023 0739e60d 5082 passed, 22 skipped + 462 passed
34711405833 4f0736bf 5082 passed, 22 skipped + 462 passed
34712571057 d1151df0 (merged, PR #450) 5083 passed, 22 skipped + 462 passed

The FEAT-003 triple — three registry_ids, five decisions, mapped onto task
2.3's own three named cases:

  • No allowance (case 1): codex.fixture.feat_003.case_1.registry. Approval
    binding-feat-003-case-1.approval = block. No dispatch decision exists for
    this binding — one was manufactured and graded anyway, and the pinned
    validator refused it outright: "a non-allow decision must terminate the gate
    sequence."
    A block terminates the sequence; there is no second decision to
    make, by contract.
  • Current allowance (case 2): codex.fixture.feat_003.case_2.registry.
    Approval binding-feat-003-case-2.approval = allow; dispatch
    binding-feat-003-case-2.dispatch = allow, reading registry revision 1,
    carrying full dispatch_authorization_evidence (expires_at 2026-09-11T01:10:00Z).
  • Revoked allowance (case 3): codex.fixture.feat_003.case_3.registry,
    revision 1 plus a revocation revision 2. Approval
    binding-feat-003-case-3.approval = allow; dispatch
    binding-feat-003-case-3.dispatch = block — the revocation lands between
    the two points, and the dispatch check re-resolves the registry and reads the
    newer head rather than trusting the approval-time snapshot.

All five decisions pin the identical policy source
(docs/execution-lane-standing-policy.md revision f211a517…) and the same
vocabulary digest (sha256:30fe8c2a…).

The admission clause of 2.2 is DEFERRED. Ruled by Brett Heap, recorded
2026-09-10, OQ-6, "all as recommended" —
review/ratification-2026-09-10.md line 85: "out of scope here, named
successor"
; lines 88-89: "the admission decision record is best cut once the
three-layer managers stop being simulated: true."
Codified at this change's
own ratified row 5.7 (discharged, T044+T045) and held there by an enforcement
test, not only a sentence: tests/intent-compliance/test_deferred_admission.py
(14 cases) fails on any committed record that IS an admission decision, and
asserts every binding's sequence is a completed PREFIX of (approval, dispatch). The identical-binding requirement across all three enforcement
points this neutral contract asks for (approval / dispatch / admission) is
therefore proved for two of three, not three of three
— admission stays open
against the named successor design.md's own migration step 4 anticipates.

Worth saying in the same breath, since 2.2's own sentence names it too: the
bounded-classifier sub-clause is also deferred, under a separate ruling
(OQ-3, same ratification date, lines 56-57 / 65-67 — "ship the deterministic
floor first and mark the classifier slice deferrable"), held by
test_deferred_classifier.py (19 cases). D2's paraphrase-evasion coverage is
not yet realized and sensitive_surface_ids is absent from every committed
record. The other four of 2.2's six named behaviors — approval, pre-dispatch,
current allowance, domain-owned revocation-race behavior — ARE realized and
proven (S1-S4, S6/FEAT-003 cases 2-3, and a trusted-snapshot measurement where
both gates re-resolve policy_source.revision 514 commits back from the
trusted checkout, confirmed live by the ALLOW run rather than only predicted
off Actions).

What is NOT yet done, so this post is not read as more finished than it is:

  • Ratified row 7.1 / T060 (validate-docs.sh exit 0) is UNTICKED. CI is
    green at all four heads above; the identical script run locally on the
    actual shipped head is red (4d341ceb, reproduced twice: 3 failed, 5079 passed, 22 skipped both times, the same two pre-existing tests, in files
    neither this change nor main touches). The mechanism is open and reported
    to the repository owner rather than called a flake; the choice (tick on CI
    evidence / land unticked / hold) was presented 2026-09-12T18:36Z. Brett
    Heap has since given his word: tick on CI evidence.

    codeXfactory/codexFactory PR doc-health: _staged_exit_changes matches only the exact heading "## Exit" (the minority spelling) and lacks the dependency-citation exclusion its docstring promises #453 prepares that tick and is in flight on
    his word, not yet landed as of this post.
  • Ratified row 7.5 / T065's BLOCK half — pending the allowance mint, as above.
  • Ratified row 7.6 / T066: realization-evidence.md exists at Status: draft
    and is deliberately not ticked. It now carries only ONE PENDING T065
    marker, down from three: the BLOCK run's own run URL/decision/::error::
    line, pending on the same allowance mint. The other two — row 4.8a's
    grandfathering path (i), and OQ-10's observed outcome for already-approved
    bindings — turned out not to need the BLOCK run at all: both were supplied
    by a separate live run, the pre-gate grandfathering run
    34726628651
    (2026-09-12, Brett Heap's verbatim word "run the pre-gate grandfathering
    run"), which dispatched a real pre-gate binding and had gate A refuse it
    with both reason codes and the remedy. (4.8a's path (ii) is a separate open
    reading for Brett now, not a PENDING T065 marker.)
  • Row 7.8 / T068, the archive gate ([OWNER]), not reached: this change's
    code_surface is non-empty, so it archives only on merged-plus-green
    realization evidence, never on landing or ratification.
    codeXfactory/codexFactory#3 stays open until then.

Whether task 2.3's own wording — "the green first-conformer realization" — is
honestly met:
Merged, yes — all ten slices above are on main, and every
one through S6 is live at the execution lane via the two pin-syncs above.
Green, only partly: CI is green at every checked head, but the same script run
locally on the actual shipped head is red, for a signature this seat has traced
to two pre-existing, out-of-surface tests. Brett Heap has since given his word
to accept CI's green as the authoritative reading for ratified row 7.1
(codeXfactory/codexFactory PR #453, in flight on his word, not yet landed as
of this post). This post reports that split rather than rounding it up
to a plain "green."

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants