Skip to content

Intent plane 5.1 (PR-4): the boundary suite — six proofs in one place, with the hosted≡local equivalence - #727

Merged
brettheap merged 2 commits into
mainfrom
feat/intent-plane-5-1-boundary-suite
Sep 6, 2026
Merged

brettheap merged 2 commits into
mainfrom
feat/intent-plane-5-1-boundary-suite

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

Path A PR-4 — task 5.1 of add-ideation-intent-plane, the unit half.

Task 5.1 names six end-to-end proofs. Five of them already held somewhere —
two in Omnigent-Install's inbox and deploy suites, three in this repository's
apply-lane and gate-route suites — and nowhere as one statement. The sixth,
hosted ≡ local disposition equivalence, existed nowhere at all: no test
anywhere compared a hosted-applied record with a locally applied one, which
left the ratified scenario resting on reading the code.

This PR adds exactly one file — tests/ideation-dashboard/test_intent_plane_boundary.py
— and touches no production code.

The six proofs, and what each one proves

# Proof (task 5.1) Test Design / spec
1 forged actor ignored test_forged_actor_is_ignored D2, D23 — spec Minimal-authority intent inbox / “A forged actor is ignored”
2 unauthorized verb refused test_unauthorized_verb_is_refused D6, D2 — spec Minimal-authority intent inbox / “An unauthorized verb is refused at the inbox”
3 stale view refused at the lane test_stale_view_is_refused D4 — spec Apply lane revalidates and commits atomically / “A stale-view intent is refused”
4 atomic commit shape test_applied_atomically D1 — same requirement / “Applied atomically”
5 hosted ≡ local dispositions (NEW) test_hosted_and_local_equivalent D5, D23 — spec Dispose tray is the first verb / “Hosted and local trays agree”
6 serving pod credential-free test_serving_pod_is_credential_free D16, D2, ruling D-1 — spec Intents are requests, never writes / “The serving pod stays credential-free”

Four companion arms fail for a second distinct reason inside the same
proof — test_forged_actor_cannot_borrow_another_actors_authority,
test_a_supplied_provenance_mapping_cannot_reach_a_record,
test_an_unverifiable_view_is_refused_fail_closed,
test_no_partial_state_survives_a_failed_pass — and
test_the_suite_carries_all_six_named_proofs reds if one of the six is ever
renamed away, so the suite cannot quietly shrink to five. 11 tests, all
green.

Two proofs have an ingress half in another repository — asserted from THIS side

Omnigent-Install is not changed here (read-only), and a copied test proves
only that the copy still runs. So where a proof lives there, the openxFactory
side asserts the same boundary from this end — the half that still has to
hold when the inbox is compromised, which is design D2 in as many words
(“Compromising the inbox yields the ability to submit well-formed intents as
the ingress-authenticated user — which the apply lane revalidates anyway”).

  • Proof 1 — ingress half:
    Omnigent-Install tests/test_intent_inbox.py::test_forged_actor_is_stamped_over.
    Here: the lane derives the record's actor, the register's
    human_disposition.authority, and the record's gateway block from the
    stamped fields alone. A body claiming actor/authority/ratifier/
    provenance applies under the stamped identity, the claim survives only as
    auditable evidence inside the committed intent, an actor stamped with no
    verbs cannot borrow another's, and a supplied provenance mapping is
    refused at the record builder (D23: provenance is a type the gateway
    constructs, and a mapping is the only thing a body could carry).
  • Proof 2 — ingress half:
    Omnigent-Install ...::test_unauthorized_verb_refused_recorded_zero_dispatch.
    Here: the lane's own allowlist recheck against the checkout the verbs
    actually execute in — a verb outside the actor's allowlist, an actor with an
    empty allowlist, and an unresolvable allowlist file (fail-closed: nobody
    may do anything) all refuse, the refusal is committed, and no gate-action
    record is written.
  • Proof 6 — deployment half: Omnigent-Install tests/test_intent_plane_deploy.py
    (no manifest carries a secret value; only the inbox mounts the dispatch
    token; both pods run locked down). Here: the code that pod runs.

Proof 5 — the new equivalence proof, and the fields excluded from it

The same disposition is applied twice through its real entrypoints, into
two separate checkouts seeded to the same register state:

  • hosted — a gate-intent replayed by intent_apply_lane.apply_intent;
  • local — a loopback serve's POST /actions/gate/dispose-possible, over
    real HTTP through the existing _serving harness.

Excluded from the comparison: provenance, and nothing else. That is the
gateway block of design D23 — “which door the action came through and how
console presence was shown” — and it is exactly what the ratified scenario
calls transport provenance: hosted stamps
{surface: intent-plane, console_presence: ingress-auth}, local stamps
{surface: http, console_presence: console-token}. Both are asserted to be
present and to carry those exact values; an unstamped record is not
“equivalent”, it is unattributed.

Everything else must agree, and the assertion fails naming any key that also
differs
. at is pinned by the harness (both doors read
gate_console._utcnow) rather than excluded — an excluded field proves
nothing, and pinning it is what lets the record filenames be compared too,
since a record path is derived from at. The register entries are asserted
identical as well, which is the other half of the ratified scenario (a
matching record over a diverged register would prove nothing).

Proof 6 — credential-free, from this side

  1. A served (non-loopback) plane advertises actions.gate: false,
    actions.intent: true, actor: null, session: false, edit: false;
    a gate POST is refused loopback_only and the register is untouched.
  2. The feed it does serve, GET /committed-intents.json, answers with no
    credential presented — it is a read of the corpus (ruling D-1).
  3. Over the ASTs of the two modules that answer hosted intent traffic —
    intent_feed and serve._serve_committed_intents — neither imports a
    credential-, process-, network- or write-bearing module, and neither names
    an environment read, a spawn, a socket or a write. A module that imports no
    os cannot read a token out of the environment however it is later edited.

Mutation-tested

Nine mutations were applied to production code and reverted; each reddened
exactly the proof that owns it and nothing else:

Mutation Result
stale_reason always returns None proofs 3 + its companion arm red
lane trusts a body-claimed args.actor proof 1 + its companion arm red
intent_feed imports os and reads a token proof 6 red (import root)
intent_feed writes the file it reads proof 6 red (path.write_text)
feed route reads os.environ proof 6 red (os.environ)
rollback removed from the lane's failure path proof 4's companion arm red (dirty tree stranded)
permissive allowlist default proof 2 red
lane dispatches with provenance=None proof 5 red (unstamped)
hosted door drops the note arg proof 5 red, naming notes as the extra differing key

No production defect was found. Nothing was patched, and nothing was
declined.

Validation

  • python3 -m pytest -q tests/ideation-dashboard/test_intent_plane_boundary.py → 11 passed
  • python3 -m pytest -q tests/ideation-dashboard → see the CI run (the known
    environmental skip/failure test_snapshot::test_find_validator_locates_pinned_checkout
    is pre-existing and unrelated)
  • pytest-suite's SELECTED/PASSED pins are floors, so +11 passes needs no
    workflow edit; SKIPPED is unchanged (this file adds no skip).

Scope

Per Brett Heap's ruling D-5 (openxFactory #656) this is a plain PR against
the existing change — no Speckit directory, no openspec/** edit.

Per ruling D-2, the LIVE half of task 5.1 — one real dispatch and one
real refusal on QA AKS — is a separate act
, authorized only once this suite
is green. Nothing in this PR reaches a network, a cluster or a live
credential. Task 5.1 is therefore not ticked here.

This PR is offered for Brett Heap's word; it is not merged, and no LANDING
is posted.

Refs #656

🤖 Generated with Claude Code

https://claude.ai/code/session_01MDVAo41VtZqJQpuawwJeYC

Task 5.1 of `add-ideation-intent-plane` names six end-to-end proofs. Five
already held SOMEWHERE — two in Omnigent-Install's inbox and deploy suites,
three in this repository's apply-lane and gate-route suites — and nowhere as
one statement; the sixth (hosted and local dispositions produce equivalent
records) existed nowhere at all.

`tests/ideation-dashboard/test_intent_plane_boundary.py` is that one place.
Six named tests map one-to-one to the task's six proofs, each naming the spec
scenario and design decision it discharges, with four companion arms that fail
for a second distinct reason inside the same proof and a roster guard that
reds if a proof is ever renamed away:

  1. forged actor IGNORED — the lane derives the record's actor, the
     register's disposition authority and the gateway block from the STAMPED
     fields alone; a body-claimed actor is preserved as auditable evidence and
     is powerless, an actor with no verbs cannot borrow another's, and a
     supplied `provenance` MAPPING is refused at the record builder (D23).
  2. unauthorized verb REFUSED — the lane's own allowlist recheck (D6, D2),
     fail-closed on an empty allowlist and on an unresolvable one, with the
     refusal committed and no gate-action record written.
  3. stale view REFUSED at the lane (D4) — materially-advanced target and
     unverifiable revision, refusal committed, the first decision intact.
  4. ATOMIC commit shape — one commit carrying intent + record + governed
     artifact, plus the half that makes "atomic" mean something: a failure
     between the act and its record rolls the checkout back to the same HEAD,
     a clean tree and no artifacts.
  5. hosted =~ local EQUIVALENCE (NEW) — the same disposition through the
     apply lane replaying an intent and through a loopback serve's
     `POST /actions/gate/dispose-possible` over real HTTP, into two checkouts
     seeded to the same register state. The two records differ in exactly one
     key, `provenance`, and the test fails naming any other; `at` is PINNED
     rather than excluded, so the record filenames compare too. The registers
     are asserted identical, which is the other half of the ratified scenario.
  6. serving pod CREDENTIAL-FREE — a served (non-loopback) plane advertises
     `gate: false` / `intent: true`, refuses a gate POST `loopback_only` and
     touches no register; the feed it does serve is a read of the corpus; and
     the two modules that answer hosted intent traffic (`intent_feed` and
     `serve._serve_committed_intents`) import no credential-, process-,
     network- or write-bearing module and name no environment read, asserted
     over their ASTs.

Tests only: no production file is touched. Seven mutations were applied to the
lane, the feed and the serve path and reverted, each reddening exactly the
proof that owns it and nothing else.

The LIVE half of task 5.1 — one real dispatch and one real refusal on QA AKS —
is a SEPARATE act under Brett Heap's ruling D-2 (openxFactory #656),
authorized only once this suite is green. Nothing here reaches a network, a
cluster or a live credential.

Refs #656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MDVAo41VtZqJQpuawwJeYC
Copilot AI lite review requested due to automatic review settings September 6, 2026 18:07

@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 ✨

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.

🟡 Changes recommended

The AST “credential-free” assertion helper can miss forbidden authority introduced via aliased imports, weakening the intended boundary proof.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a dedicated “intent-plane boundary suite” test module that consolidates task 5.1’s six boundary proofs (plus companion arms) into one place, including a new hosted≡local disposition equivalence proof, without touching production code.

Changes:

  • Introduces tests/ideation-dashboard/test_intent_plane_boundary.py with 11 tests covering six named proofs (forged actor, unauthorized verb, stale view, atomicity/rollback, hosted≡local equivalence, credential-free serving pod).
  • Adds an equivalence assertion comparing hosted apply-lane records vs loopback HTTP gate-route records (excluding only transport provenance).
  • Adds AST-based “credential-free” constraints over intent_feed.py and serve._serve_committed_intents.
File summaries
File Description
tests/ideation-dashboard/test_intent_plane_boundary.py New boundary-proof suite covering task 5.1’s six proofs, including hosted≡local equivalence and credential-free serving assertions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

@brettheap

Copy link
Copy Markdown
Contributor Author

RULING — WORDS — Brett Heap, 2026-09-06T23:03Z, in session (lane openxfactory-4-opendox-extraction, session 01MDVAo41VtZqJQpuawwJeYC), verbatim: "merge 727 and 728 when green" — Path A PR-4 #727 (boundary suite) and § 2.3 #728 (classify-derived header fields) land once green with no unresolved threads and their verifiers passed; landing notes (no openspec/changes/ path); admin squash because brettheap-authored PRs cannot self-clear the code-owner review.

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

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.

🟡 Changes recommended

A couple of new comments in the credential-free proof overstate what the test actually enforces (scope vs module imports) and should be tightened to avoid misleading future readers.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

tests/ideation-dashboard/test_intent_plane_boundary.py:567

  • This comment reads like the check is proving the whole serving module is credential-/network-/process-free, but the assertion below only inspects the _serve_committed_intents AST subtree. Rewording to make the scope explicit will avoid over-claiming what the test guarantees.
    # ...and the serve handler that calls it: parsing a query string and
    # handing back bytes, with no environment read, no spawn, no socket of its
    # own and no write.
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

LANDING (record only — tests only, no openspec/changes/ path) — lane openxfactory-4-opendox-extraction, session 01MDVAo41VtZqJQpuawwJeYC, 2026-09-06T23:31Z, PR #727 into openxFactory main on Brett Heap's words "merge 727 and 728 when green"; head 50a0186, all checks SUCCESS, 0 unresolved threads, 0 closing refs, MERGEABLE.

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

@brettheap
brettheap merged commit 07624d5 into main Sep 6, 2026
10 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

LANDED — lane openxfactory-4-opendox-extraction, 2026-09-06T23:32Z, PR #727 → 07624d5e (admin squash at head 50a0186, 23:31:47Z). Path A PR-4 realized (unit half of 5.1); the live half follows on D-2.

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

brettheap added a commit that referenced this pull request Sep 9, 2026
…1/5.2 ticked on the D-2 evidence) (#832)

Path A PR-5, the last of the 2026-09-06 plan memo's sequence, on Brett Heap's word "merge pr-5 when green" (2026-09-09). Authority: his ruling of 2026-09-05T23:38Z "rule path A, 4.5 is a deferred successor" (#656) and ruling D-2 (the live exercise).

- tasks.md: § 4.4 / § 5.1 / § 5.2 ticked on the D-2 evidence (three `- [ ]` heads removed, every ratified sentence kept byte-identical); § 4.5 untouched as a DEFERRED SUCCESSOR (#714 → 3d1b8cc).
- Archived WITH promotion via `scripts/proposal-support.py . archive --date 2026-09-09` under the pinned @fission-ai/[email protected] (never a bare `openspec archive`); origin retained (declaration unchanged since da1b0e9); six frozen files R100.
- Promoted: `openspec/specs/ideation-intent-plane/spec.md` NEW (7 requirements / 11 scenarios, every block byte-identical to the archived delta) and `openspec/specs/document-lifecycle/spec.md` 18 → 19 requirements ("Gates happen on main"); the new capability's `## Purpose` written by this act (no SHALL; replaces the CLI's TBD stub). openspec/specs 60 → 61; floor regeneration OWED (GRACED covered-pending 1, `created_by_candidate`), `contracts/review-lane-floor-snapshot.yaml` deliberately not edited here.
- README OpenSpec Records row → archived; sweep-ledger row re-seeded with the tool (`--seed-ledger --moved-by '#832'`, one line moved); no thirteenth archive-date disposition.
- Evidence (merged + green): #718 d179cc0, #727 07624d5, #735 6d3237e, xFactory #304 b2db7e47, #313 ddd19650, #345 90435875, #781 450bb60, #808 2ef7d8c, #814 c991c0f, #816 8924230, xFactory #362 119280a8, #830 202c170, xFactory #369 c2313277; D-2 live exercise: act B refusal 36d07ec, act A apply e970dfe, first autonomous merge #176 → 7681e40 (codexfactory[bot] APPROVED 2026-09-09T06:37:22Z).
- Copilot round 1: one factual finding taken (a missing "where" in Purpose); two wording findings answered and resolved.

Refs #656 (stays OPEN). Rule 6 LANDING window observed.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
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