Skip to content

Land add-factory-mcp-conformance on main as Speckit feature 037, with repairs and validator fixes - #1243

Merged
brettheap merged 53 commits into
mainfrom
037-factory-mcp-conformance
Oct 6, 2026
Merged

brettheap merged 53 commits into
mainfrom
037-factory-mcp-conformance

Conversation

@brettheap

@brettheap brettheap commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-5 (openXfactory-5)

Brett Heap, 2026-10-05, verbatim: "confirm 1, close 018, adopt the work, re-anchor codexFactory". The same day, verbatim: "keep one server per domain, no combined endpoint".

The OpenSpec change add-factory-mcp-conformance was ratified by Brett Heap's "yes" on 2026-09-07; the record is openspec/changes/add-factory-mcp-conformance/review/ratification-2026-09-07.md (reviewed revision 8acd2ec4). This pull request lands that change and its Speckit realization on current main. It stays DRAFT; landing is Brett's word, and the Rule 6 LANDING window applies because it touches openspec/changes/.

What lands

  • The neutral, offline advisory-v1 declaration profile: contracts/factory-mcp/declaration.schema.json, a synthetic example, and the validator scripts/validate-factory-mcp.py. It reports structure, references, semantics and gaps separately, and verified_conformance is always false.
  • The 14-document brainstorm packet ideation/brainstorm/factory-mcp-*.md, the runbook docs/factory-mcp-conformance.md, and the Speckit feature specs/037-factory-mcp-conformance/.
  • openxFactory hosts no MCP server, transport or auth. Each domain keeps its own service at its own address, per Brett's topology ruling above.

Provenance

  • Authored by the Codex lane mcp-family-contract, 2026-09-07. Until now it existed only on two preserved public review branches: review/20261004-review/xfactory-mcp-U0ZKK6-openxFactory-e2188e at 54bce013 (design and ratification), and review/20261004-review/xfactory-mcp-U0ZKK6-openxFactory-worktrees-030-factory-mcp-conformance-c41256 at d2baf6fd (realization, containing 54bce013).
  • Brought over by MERGE, not cherry-pick: f307c420 merges d2baf6fd onto main 8a37a087, so the five original commits, unchanged, are ancestors of this head. Everything after that merge is this lane's.

Repairs (non-normative)

The change's tasks.md records these in a dated 2026-10-05 addendum. No requirement or scenario text changed.

# Repair Commit
1 Renumber the Speckit feature 030 to 037. Main took specs/030-realize-codexfactory-identity on 2026-09-08, and 035/036 sit on review branches. 037 was free on main and in every open PR on 2026-10-05. Every path reference moved; the verification record keeps its historical "allocated 030" sentence with a dated note. bed9b79b
2 Drop the AGENTS.md SPECKIT active-plan pointer that main retired in 687b85e3. bed9b79b
3 Rename tests/factory-mcp/test_conformance.py to test_factory_mcp_conformance.py. The old basename collided with tests/corpus-adapter/test_conformance.py, which interrupts the required pytest-suite at collection. 9ed3e9b2
4 review/ratification-2026-09-07.md: Status: record becomes Status: ratified plus a Ratified: citation. This was the merge's one new CRITICAL doc-health finding (ratified-provenance). 71013ba4
5 Add the README OpenSpec Records row. The doc index (README "Core domain-neutral docs") already links the brainstorm overview, proposal and runbook from the merge. 71013ba4
6 Name the codex repository codeXfactory/codexFactory in new text. 71013ba4
7 Reduce the codex baseline to public facts (see Disclosure). 71013ba4
8 Seed the sweep-ledger row with validate-sequenced-after.py . --seed-ledger --moved-by '#1243'. b8c0d5e2

Validator fixes against the already-ratified requirements, red first

The tests were committed first (d8b2e0cb) and run against the unchanged validator: 96 failed, 23 passed (tests plus subtests). After the fix (59fbab7b): 51 passed, 85 subtests passed. Every schema in the suite is SYNTHETIC; the two "shaped like" cases copy the structure of the codex and Ops schemas, not their bytes. Every socket is blocked in setUp.

Finding Ratified requirement it serves Red-first tests (result at d8b2e0cb) Fix (59fbab7b)
H2 nested $id refused Offline pinned reference integrity; Existing tools test_embedded_resource_with_nested_id_is_accepted (refused: unsupported_nested_schema_id at /); test_fragment_inside_embedded_resource_resolves_against_that_resource; test_relative_reference_inside_embedded_resource_is_refused; test_relative_reference_under_a_root_base_uri_is_refused (all red) A nested $id is an embedded resource. Fragments inside it resolve against it, as JSON Schema 2020-12 does (checked against jsonschema itself). Only a relative non-fragment $ref inside it is refused: relative_reference_in_embedded_resource.
H3 union error codes never resolvable Lossless results and explicit failures; design D1 "including union variants" test_codex_shaped_error_union_resolves_by_discriminator, test_ops_shaped_root_error_union_resolves_by_discriminator, test_discriminated_union_is_still_exhaustive, test_discriminator_must_be_a_required_string_constant (red: the closed schema refused the field); test_codex_shaped_error_union_needs_a_discriminator (red on location) The schema needed a field, so one was added: an optional, closed inventory discriminator. The vocabulary is the union of each oneOf/anyOf branch's required properties.<discriminator> const or enum, following $ref. Without it, behaviour is unchanged.
M1 lax JSON-Pointer indices Lossless results test_pointer_indices_are_strict (-1, 01, +1, 1 accepted as valid-with-gaps) RFC 6901 indices ^(0|[1-9][0-9]*)$, and ~ escapes checked.
M1 one variant passes as all mapped (P4) Lossless results ("all declared statuses and error codes") test_every_result_variant_is_covered, test_one_member_of_a_union_does_not_cover_the_union, test_a_definition_reached_only_through_one_variant_does_not_cover_the_union (all valid-with-gaps) An inventory inside one union member requires every sibling member to hold an inventory on that schema file: uncovered_outcome_branch. Judged by $ref reachability, so a definition every variant shares covers them all. The guards test_a_definition_shared_by_every_variant_covers_the_union and test_one_file_with_result_and_error_variants_is_covered_by_both pass.
M7 weak tests Malformed catalog (stable codes and locations); Deterministic validation Every test now asserts (code, location) lists; test_digest_mismatch (red: /); test_packaged_example runs the shipped example; test_schema_depth_limit (red) The digest_mismatch path is exercised; the example runs in the suite.
L1 blurred codes Malformed catalog; design D6 exit codes test_cli_exit_codes, test_in_memory_declaration_codes, test_cli_usage_errors_exit_two, test_diagnostics_are_deterministic_and_unique, test_unavailable_snapshot, test_oversized_artifact, test_malformed_and_invalid_schema_files (all red) Distinct codes: input_size_limit, artifact_size_limit, duplicate_json_key, non_json_number, malformed_json, input_unreadable, reference_not_a_file, schema_depth_limit. Reference diagnostics name the failing citation, e.g. /tools/0/input; semantic ones name the field. Diagnostics are de-duplicated. A malformed --snapshot is a usage error, exit 2.
L2 weak resource URI Identity and scope mapping test_resource_uri_is_https_without_fragment_or_userinfo (red) https only, with a host and no userinfo, fragment or control characters.
L3 free-text tool ids Closed versioned declaration test_tool_id_is_a_bounded_token (red) A schema pattern [A-Za-z0-9_.-], max 80.
L4 schemas not tied to source Offline pinned reference integrity test_tool_schemas_come_from_the_declared_source (red) tool_schema_outside_source.
L5 hidden keywords Offline pinned reference integrity test_content_schema_and_dependencies_are_walked (red) contentSchema, legacy dependencies and additionalItems are walked.

Copilot review rounds, each red first

Review (at) Threads Red tests Red result Fix After
5419026094 (dbf1688f) 10 94ca87e1 12 failed c9dbaa9b 59 passed, 91 subtests
5419154777 (b8c0d5e2) 5 91507eec 9 failed c96d1894 64 passed, 98 subtests
5419262363 (c9dbaa9b) 4 7fb10867 4 failed 6a1f6d1c 68 passed, 100 subtests
5419355635 (c96d1894) and 5419477722 (b8916bdf) 5 b080a3a8 13 failed (tests and subtests) 754d94bc 72 passed, 117 subtests
5419809508 (b8cc4df7) 3 66b610b6 11 failed; union coverage peaked at 64 MB on a 29 KB schema a12c7027 74 passed, 141 subtests; peak 1.2 MiB (4.7 MiB at four times the layers)
5421098780 (038661be) 2, plus 1 in the review body 67558dbe 7 failed; 267,776 resolver calls for 512 shared aliases bc2e387e 77 passed, 149 subtests; 3,072 resolver calls (6,144 at twice the aliases)
5421267903 (1f9e3d7e) 1, plus 1 in the review body d4177714 5 failed d3a9e05b 79 passed, 156 subtests
5421477111 (6af44423) 2, plus 3 in the review body 32f00de2 8 failed b247eda2 80 passed, 166 subtests
5421601208 (3e3f1428) none, 2 in the review body afdc94cb 3 failed; output reached 362,693 bytes 34d87981 82 passed, 170 subtests; projection capped at 10,002 steps
5421723966 (56cb3d49) 3 c13e6bc4 9 failed d7a1f86b 85 passed, 181 subtests
5421899020 (fcc52c39) 3, plus 1 in the review body 9b021b60 12 failed dddb5007 87 passed, 196 subtests
5423269766 (22b0074f) 2 b268e5c0 2 failed 4e886747 88 passed, 197 subtests
5423342885 (9cfba051) 1 758fe67f 3 failed 8cd13650 88 passed, 203 subtests

Review 5420018661 at a12c7027 reported no findings.

Round 4: a oneOf whose discriminated branches share a code is unresolved. A long $ref chain is a located schema_depth_limit, not an uncaught RecursionError. A boolean schema is identified by its place, so a reachable true needs only a gap. A member that reaches false through $ref admits nothing. A malformed percent escape is refused in the resource URI. Round 5: union coverage builds each schema file's reference graph once and propagates holding over its reverse edges, so memory is linear. A pure-reference chain to true counts as an open member, like a literal true. The resource URI accepts only the characters RFC 3986 allows unescaped. Round 6: minProperties, maxProperties and propertyNames count as narrowing constraints. A $schema other than 2020-12 is refused (unsupported_schema_dialect). Shared $ref chains are memoized, and each schema file's graph is checked once, so resolver work is linear. Round 7: a referenced file's root dialect is checked on load, and so is every resource a reference's pointer passes through. A branch whose required names are forbidden by an enclosing additionalProperties: false, or whose required property is false, is unresolved. Round 8: the discriminated projection reads only a closed set of keywords on every union, link and branch. Anything else, such as dependentRequired, unevaluatedProperties, an asserting additionalProperties schema or properties on an enclosing union, leaves the inventory unresolved. Closure through $ref counts. A required property's schema is judged at its top level after its $ref chain, as stated in the runbook. Core metadata counts as non-asserting for pure references. Round 9 opened no thread. Projection work for one inventory is bounded (projection_work_limit at its pointer), because paths that inherit different required names cannot share memoized results. Rendered CLI output is bounded at 256 KiB, the plan's output bound: past it, the CLI prints a report carrying only output_size_limit, with exit 2. The seven review-body findings have no threads; they are answered here and by bc2e387e (shared $ref chains), d3a9e05b (closed schemas), b247eda2 (three) and 34d87981 (two). 56cb3d49 merges main ba89e046 (#1209, the dashboard lane; no overlap). Round 10: then and else are not outcome locations. type, const and enum along a required property's $ref chain apply together, so a contradiction among them holds no value. A mapped scope that cites a scope gap is refused (mapped_scope_claims_gap). Round 11: the schema bytes parsed in one run are bounded at 4 MiB (schema_total_size_limit). A required property's top-level oneOf or anyOf is not analyzed. Compound values compare recursively, as JSON does. A $ref fragment is strictly percent-decoded, so :, ? and well-formed escapes may select keys, while the path keeps its restrictions. The eighth review-body finding is answered by dddb5007. Round 12: a number literal that overflows to infinity is refused where it is parsed (json_number_limit), and a $ref fragment is decoded before it is told apart from a named anchor. Round 13: a nonzero literal that underflows to zero (1e-9999) is refused the same way, while real zero literals are kept. 5d0ea5de split the validator into phase functions with no behaviour change. Every thread was replied to (each reply starts with the Lane line) and resolved. Thread r4187464479, about disclosure, is routed to Brett below.

Out of tree, against the real schemas: read-only, from the review's existing snapshots, copying nothing. A faithful codex declaration at 4b12ba83 and the Ops DNS proposed fit at 6b7cdaa6 both return valid-with-gaps (scope and audit gaps only) once the error inventory names discriminator: code. Without the discriminator, both return the honest unresolved_inventory_without_gap. With one codex code left unmapped, incomplete_outcome_mapping is reported. The review's own adversarial probe now refuses P3, P3b, P4, P6, P7, P8, P9 and P17 with located codes.

Correction: the messages of 5d0ea5de, c9dbaa9b, c96d1894 and 6a1f6d1c say these real-schema probes were unchanged. When they were written, the probe was loading the validator from a clone still at b8c0d5e2, so those runs proved nothing about the commits they name. The probe was then re-run against each of those commits' own validator and schema, extracted with git archive, and against 754d94bc, a12c7027, bc2e387e, d3a9e05b, b247eda2, 34d87981, d7a1f86b, dddb5007, 4e886747 and 8cd13650. All fifteen reports are byte-identical, so the statements hold. The adversarial probe always loaded the right tree.

Not done, and why: M5 (the Unavailable dependency scenario) and M6 (auth and transport) are normative and wait for rulings. L6 (an all-gaps CI flag) and L7 (informational) were not in this brief. Probe P5 and probe P11 therefore behave as before.

Known open after Copilot review 5423416323 (at 6ab71267, no thread)

Copilot's fourteenth review opened no thread, but its body lists three precision limits in code this pull request did not change in that round. They are NOT fixed here and are recommended for a follow-up issue:

  1. dependentSchemas is still walked as an outcome location, although it applies only when its trigger property is present (the same treatment as then/else would fix it).
  2. The NARROWING guard is not applied to a required property's own top level, so {"type": "string", "const": "x", "minLength": 2} is read as satisfiable.
  3. Projection starts at the inventory pointer and does not carry ancestor constraints; a root allOf narrowing a nested enum is not seen.

Each can make the validator accept a mapping that is too wide, or refuse an honest gap. None affects the codex or Ops reports above.

Disclosure, for Brett's decision

codexFactory is PRIVATE and this repository is PUBLIC. No codex bytes are vendored; the tests use synthetic schemas only.

SonarCloud (not a required check) fails its quality gate on pythonsecurity:S8707: the CLI opens the declaration path it was given. That is the tool's purpose, the read is bounded to 256 KiB and it returns only the declaration's own diagnostics, so it was left unchanged and is disclosed here.

Removed from review/codex-baseline-2026-09-07.md (71013ba4):

  1. The three schema files' paths inside codexFactory: the package directory and file names.
  2. The source module prefix path and the three implementation module names.
  3. A description of how those modules behave: tool ordering and descriptor derivation, the inspection and verification flow including the idempotency lease and trusted runner, and the shared result mapping.
  4. The two codex tool ids.
  5. The list of mapping questions the codex side had not resolved: scope tuple, revocation freshness, deployment provenance, audit sink and behavioural evidence.

Kept: the revision 4b12ba83 (already public on main), the three digests by role (tool request, tool result, domain error), and the compatibility statement from the ratified Existing tools scenario.

Also reduced: the runbook's compatibility paragraph repeated items 3 to 5, and was reduced to match.

Left as authored, for your decision: the brainstorm packet still describes the codex tools at design level. factory-mcp-codex-mapping.md, factory-mcp-tool-catalog.md and factory-mcp-synthesis-three-tool-fit.md name the two tool ids, the engineering request fields, a "CheckRunner", a raw-secret scan and the single in-process core. factory-mcp-overview.md names the planned hostnames mcp.opsxfactory.opensoft.dev and mcp.medxfactory.opensoft.dev. review/claim.md carries one Codex session UUID.

History: because this branch MERGES d2baf6fd, the unreduced wording stays reachable in this branch's history. A merge-commit landing would carry it into main's history; a squash landing would not. If the decision is to withdraw that text, choose the landing method accordingly. Deleting the two public review branches is separately your word.

Out of scope, waiting for Brett's rulings

  • An auth and transport block, with a neutral MCP auth profile: codex accepts EdDSA only, Ops RS256 only.
  • Where the family error vocabulary lives.
  • Enforcement of the Unavailable dependency scenario (M5).
  • Whether the trigger for extracting a shared transport is met.

Gates

Recorded in specs/037-factory-mcp-conformance/verification.md (038661be).

Full CI command (python3 -m pytest tests/ -q -m "not postgres"): run at a12c7027 against main 0f2a87f6, in two full clones of the same kind, with the CI lock installed with hashes. No test newly fails, none newly passes, and the skips are equal (7 on both). There are 74 new testcases, all in tests/factory-mcp. Three tests fail on BOTH sides, all from the local environment: a basetemp placement, a symlinked clone root, and a subprocess timeout on a loaded host. After 038661be, the 2900 testcases that read the corpus were re-run, and the only change is that the timeout test passed. The earlier pair, b8c0d5e2 against 12753f27, was also clean. After a12c7027, the commits change only scripts/validate-factory-mcp.py, its test module, the runbook and the feature's Markdown (git diff --stat a12c7027..6ab71267, apart from main's #1209 merged at 56cb3d49). At 1f9e3d7e, the corpus-reading test files and the factory-mcp module ran again: 2974 passed, and the only failures were the two environment tests. At 56cb3d49, after main was merged in, the corpus-reading subset ran again: 2979 passed, and the only failures were the same two environment tests. At 8cd13650, the factory-mcp module passes (88 tests, 203 subtests). CI's required pytest-suite passed in full at fcc52c39. The nine commits after it, 9b021b60 to 6ab71267, change only the validator, its test module, the runbook and this feature's Markdown, and CI runs the full suite again at the final head. CI's required pytest-suite runs the full command at the final head.

Gates, at a12c7027 against 0f2a87f6:

  • Pinned OpenSpec --all --strict: exit 0 on both. The branch passes 111 of 112 items and main 110 of 111; the single remaining item is the same accepted exception on both (add-chain-attestation). --change add-factory-mcp-conformance --strict is clean.
  • doc-health --single-repo: 31 critical, 26 error, 69 warning and 20 info on both, with no new regression. Only the informational draft count differs (71 against 70).
  • validate-sequenced-after.py and --ledger-diff: exit 0 on both.
  • code-surface, target-release, scope-globs, manifest-digests, pin-registrations, ideation-routing and document-catalog: exit 0 on both.
  • ideation-cross-reference (exit 1) and contract-release (exit 2): byte-identical output on both sides.

Closes #1242

🤖 Generated with Claude Code

brettheap and others added 12 commits September 7, 2026 12:33
Brings over, by merge, the preserved review branch
review/20261004-review/xfactory-mcp-U0ZKK6-openxFactory-worktrees-030-factory-mcp-conformance-c41256
at d2baf6f, which contains the design
branch's 54bce01. Authored by the Codex
lane mcp-family-contract; adopted by lane openXfactory-5 on Brett Heap's
word of 2026-10-05 for #1242. The repairs that
current main requires follow in separate commits.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took specs/030-realize-codexfactory-identity on 2026-09-08, one day
after this feature was numbered locally; 035 and 036 are held on review
branches, so 037 is the next free number (checked against main and every
open pull request on 2026-10-05). Every path reference moves with the
directory; the verification record keeps its historical "allocated 030"
statement and gains a dated note.

AGENTS.md returns to main's bytes: main retired the SPECKIT active-plan
pointer in 687b85e (2026-08-27), and the merged hunk would have steered
every agent in this multi-lane repository to this one plan.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests/factory-mcp/ is a plain directory, so pytest's default prepend
import mode names its module by bare basename. test_conformance collided
with tests/corpus-adapter/test_conformance.py (landed 2026-09-06, PR #725):
the required `python3 -m pytest tests/ -q -m "not postgres"` stops at
"import file mismatch", and main's guard
test_no_two_test_modules_resolve_to_the_same_import_name names the pair.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…blic facts

- review/ratification-2026-09-07.md: Status: record becomes Status:
  ratified with a Ratified: citation. Since #878 the doc-health
  ratified-provenance family reads a review record that records a
  ratification by its subject, and the merged header was its one new
  CRITICAL finding over main.
- README OpenSpec Records: add the change's row (it had none).
- review/codex-baseline-2026-09-07.md: codexFactory is private and this
  repository is public. Keep the revision (already public on main), the
  three schema digests by role and the compatibility statement; remove
  the schema paths, module paths and names, the module-behaviour summary
  and the codex-side open-question list. Name the repository
  codeXfactory/codexFactory. The pull request lists what was removed for
  the owner's disclosure decision.
- docs/factory-mcp-conformance.md: the compatibility paragraph repeated
  the same module-behaviour summary and tool names; reduced to match.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ified fixes

Rewrites tests/factory-mcp/test_factory_mcp_conformance.py so every case
asserts diagnostic codes and JSON-pointer locations, not only the status
(the ratified *Malformed catalog* scenario requires stable codes and
locations), and adds failing witnesses for the validator fixes that
follow:

- H2: a nested `$id` is an embedded resource; a fragment inside it
  resolves against that resource; only a relative non-fragment `$ref`
  inside it is refused. Synthetic schema of the codex request's shape.
- H3: outcome inventories resolved across `oneOf` branches through an
  optional `discriminator`, following `$ref`. Synthetic schemas of the
  codex and Ops error-union shapes.
- M1: strict RFC 6901 array indices; one union member or one result
  variant does not cover the union.
- M7: digest_mismatch exercised; the packaged example runs in the suite.
- L1-L5: distinct input codes, exit 2 for a usage error, located and
  de-duplicated diagnostics, https-only resource URI, a tool id token,
  tool schemas tied to `source`, `contentSchema` and `dependencies`
  walked.

Against the unchanged validator at 71013ba: 96 failed, 23 passed (tests
and subtests). Every socket is blocked in setUp; all schemas are
synthetic.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… M7, L1-L5)

- H2: a nested `$id` below the document root is an embedded schema
  resource. Fragment references inside it resolve against it (JSON
  Schema 2020-12); only a relative non-fragment `$ref` inside it is
  refused (relative_reference_in_embedded_resource). A root `$id` still
  refuses relative file references (unsupported_schema_base_uri).
- H3: an inventory may name an optional `discriminator`. The vocabulary
  is then the union of each `oneOf`/`anyOf` branch's required
  `properties.<discriminator>` const or enum, following `$ref`. The
  declaration schema gains that one optional, closed field. Without it,
  behaviour is unchanged and an unresolvable union still needs a gap.
- M1: JSON Pointer array indices parse strictly (RFC 6901: `0` or a
  digit run with no leading zero), and `~` escapes are checked. An
  inventory inside one member of a union leaves the union uncovered
  unless every other member holds an inventory on that schema file
  (uncovered_outcome_branch at /tools/N/output or /tools/N/error).
  Membership is judged by reachability through `$ref`, so a definition
  every variant shares covers them all.
- M7, L1: diagnostics carry the declaration location of the failing
  citation or field, are de-duplicated, and keep distinct codes
  (input_size_limit, artifact_size_limit, duplicate_json_key,
  non_json_number, malformed_json, input_unreadable, schema_depth_limit,
  reference_not_a_file). A malformed --snapshot is a usage error, exit 2.
- L2: canonical_resource_uri must be https with a host, and no userinfo,
  fragment or control characters.
- L3: a tool id is a `[A-Za-z0-9_.-]` token.
- L4: a tool's input, output and error schemas come from the repository
  and revision `source` names (tool_schema_outside_source).
- L5: `contentSchema`, legacy `dependencies` and `additionalItems` are
  walked for references.

Guards added for this change's own edge cases: one file carrying both
result and error variants, NUL bytes in paths and references, and
circular or lone-surrogate in-memory values.

tests/factory-mcp: 51 passed, 85 subtests passed (red at d8b2e0c: 96
failed, 23 passed). Out of tree, read-only and copying nothing: a
faithful codex declaration at 4b12ba83 and the Ops DNS fit validate as
valid-with-gaps with `discriminator: code`.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e 037

docs/factory-mcp-conformance.md: discriminator inventories, union
coverage, strict RFC 6901 pointers, embedded `$id` resources, the
https-only resource URI, the tool id token, tool schemas tied to
`source`, located and de-duplicated diagnostics, the distinct input
codes, and exit 2 for a usage error.

specs/037-factory-mcp-conformance: the quickstart validates through the
pinned OpenSpec entrypoint instead of a bare `openspec` on PATH, and the
interface record names the usage-error exit and the discriminator.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 18:24
brettheap and others added 3 commits October 5, 2026 18:25
Takes #1233 (plan 034 bookkeeping) so the branch and the main baseline
of the full-suite comparison share one base.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… repair addenda

- tests/sequenced_after/corpus-ledger.yaml: `--seed-ledger --moved-by
  '#1243'` adds the change's one row (active, sole, declares absent);
  `--ledger-diff` is clean after it. Without the row, four test_sweep
  tests red the required pytest-suite.
- The change's tasks.md gains the dated 2026-10-05 addendum that records
  every non-normative repair and the validator realignment.
- The feature's tasks.md gains the repair round, T009 to T015. T015, the
  gates, stays open until they have run.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SonarCloud scored validate() at cognitive complexity 177 and four other
functions above 15. validate() now runs named phases (check_input,
check_structure, check_references, check_catalog, check_tool with
check_support, check_claims, check_mapping and check_inventories).
finite() delegates to finite_values and finite_branches, the pointer
state machine is pointer_state, union members are judged by member_hold,
and locate() drops its unused parameter.

`[0-9]` stays rather than `\d`: Python's `\d` matches non-ASCII decimal
digits, which RFC 6901 indices exclude.

tests/factory-mcp: 51 passed, 85 subtests passed. The review's
adversarial probe and the out-of-tree codex and Ops probes give
byte-identical output before and after.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>

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.

Copilot review overview

🔵 Needs a closer look

Public disclosure and preserved-history decisions require explicit owner approval, and validator defects remain unresolved.

Review effort: Balanced
Findings: 9 Medium severity · 1 Low severity

Open (10)
What changed in this PR

Introduces openxFactory’s offline advisory-v1 MCP declaration profile as Speckit feature 037, preserving domain ownership without hosting a server or certifying runtime conformance.

Changes:

  • Adds the declaration schema, offline validator, and synthetic regression coverage.
  • Documents validation, compatibility, and separate domain services.
  • Imports design and ratification records with feature-numbering and landing repairs.
File Description
tests/​factory-mcp/​test_factory_mcp_conformance.py Synthetic validator regression coverage.
specs/​037-factory-mcp-conformance/​verification.md Historical implementation evidence.
specs/​037-factory-mcp-conformance/​tasks.md Implementation task tracking.
specs/​037-factory-mcp-conformance/​spec.md Feature requirements and acceptance criteria.
specs/​037-factory-mcp-conformance/​research.md Implementation decisions.
specs/​037-factory-mcp-conformance/​quickstart.md Test and validation commands.
specs/​037-factory-mcp-conformance/​plan.md Architecture and delivery plan.
specs/​037-factory-mcp-conformance/​data-model.md Contract model references.
specs/​037-factory-mcp-conformance/​contracts/​interface.md Callable and CLI interface.
specs/​037-factory-mcp-conformance/​checklists/​repetition.md Repetition requirements checklist.
specs/​037-factory-mcp-conformance/​checklists/​references.md Reference-integrity checklist.
specs/​037-factory-mcp-conformance/​checklists/​evidence.md Evidence requirements checklist.
specs/​037-factory-mcp-conformance/​checklists/​contract.md Declaration contract checklist.
specs/​037-factory-mcp-conformance/​checklists/​compatibility.md Compatibility requirements checklist.
specs/​037-factory-mcp-conformance/​checklists/​authority.md Authority-boundary checklist.
scripts/​validate-factory-mcp.py Offline structural, reference, and semantic validation.
README.md Profile links and lifecycle index entry.
openspec/​changes/​add-factory-mcp-conformance/​tasks.md Governance and landing checkpoints.
openspec/​changes/​add-factory-mcp-conformance/​specs/​factory-mcp-conformance/​spec.md Ratified requirements and scenarios.
openspec/​changes/​add-factory-mcp-conformance/​review/​validation-2026-09-07.md Proposal validation evidence.
openspec/​changes/​add-factory-mcp-conformance/​review/​ratification-2026-09-07.md Ratification and corrected lifecycle header.
openspec/​changes/​add-factory-mcp-conformance/​review/​codex-baseline-2026-09-07.md Reduced source-pinned compatibility baseline.
openspec/​changes/​add-factory-mcp-conformance/​review/​claim.md Authoring provenance.
openspec/​changes/​add-factory-mcp-conformance/​proposal.md Scope and realization handoff.
openspec/​changes/​add-factory-mcp-conformance/​design.md Declaration and validation design.
openspec/​changes/​add-factory-mcp-conformance/​.openspec.yaml Approved origin metadata.
ideation/​README.md Brainstorm packet index.
ideation/​brainstorm/​factory-mcp-trusted-context.md Trusted scope design.
ideation/​brainstorm/​factory-mcp-tool-catalog.md Domain catalog design.
ideation/​brainstorm/​factory-mcp-synthesis-three-tool-fit.md Cross-domain capability comparison.
ideation/​brainstorm/​factory-mcp-synthesis-family-surface.md Shared conventions and separate services.
ideation/​brainstorm/​factory-mcp-synthesis-evaluation-safety.md Evaluation safety synthesis.
ideation/​brainstorm/​factory-mcp-service-identity.md Deployment identity distinctions.
ideation/​brainstorm/​factory-mcp-results-evidence.md Outcome and disclosure design.
ideation/​brainstorm/​factory-mcp-replay-freshness.md Replay and observation semantics.
ideation/​brainstorm/​factory-mcp-ownership.md Domain and hosting responsibilities.
ideation/​brainstorm/​factory-mcp-overview.md Packet overview and navigation.
ideation/​brainstorm/​factory-mcp-implementation-boundaries.md Initial implementation boundaries.
ideation/​brainstorm/​factory-mcp-effects-authority.md Effects versus advisory authority.
ideation/​brainstorm/​factory-mcp-dns-check.md Proposed Ops-owned DNS capability.
ideation/​brainstorm/​factory-mcp-codex-mapping.md Codex compatibility design observations.
docs/​factory-mcp-conformance.md Validator usage and limitations.
contracts/​factory-mcp/​examples/​outcome.json Synthetic outcome schema.
contracts/​factory-mcp/​examples/​declaration.example.json Runnable declaration example.
contracts/​factory-mcp/​declaration.schema.json Closed advisory declaration schema.

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

Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Copilot AI balanced review requested due to automatic review settings October 5, 2026 18:38
brettheap and others added 2 commits October 5, 2026 18:42
Failing witnesses for eight findings of Copilot review 5419026094
(at dbf1688):

- r4187464151: a self-referencing symlink raises RuntimeError on Python
  3.12 instead of a refusal.
- r4187464184: a `$ref` into annotation data (`#/examples/0`,
  `#/required`, an enum array) passes the graph walk.
- r4187464246: `oneOf` and `anyOf` on one node; only the first was read.
- r4187464294: under `oneOf`, a value valid in two branches is invalid,
  but was counted.
- r4187464328: a `$ref` under `not` counted as covering a variant.
- r4187464362: a backslash passed the fallback resource-URI check.
- r4187464393: JSON `0.0` and `0e0` inventory indexes crashed with
  TypeError.
- r4187464441: an inventory on an unused `$defs` entry bypassed coverage.

Also: `type` excluding strings, and `enum` beside a union, read as
unresolved. Against 5d0ea5d: 12 failed, 53 passed.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- r4187464151: safe_path turns a symlink loop (RuntimeError on Python
  3.12, ELOOP later) into unsafe_reference_path.
- r4187464184: every resolved `$ref` target must be a schema. A non-object
  is reference_to_non_schema; an object failing the metaschema is
  invalid_referenced_schema.
- r4187464246: a node with both `oneOf` and `anyOf` is unresolved, in
  value and discriminated inventories alike.
- r4187464294: under `oneOf`, a value counts only when exactly one branch
  accepts it. An `enum`/`const` beside a union, or a `type` excluding
  strings, is unresolved.
- r4187464328: reachability and coverage never enter `not` or `if`; the
  reference walk still does.
- r4187464362: a raw backslash fails the resource-URI check.
- r4187464393: mapping indexes are cast to int, because the schema's
  `integer` admits JSON `0.0` and `0e0`.
- r4187464441: an inventory must be reachable from its schema's root
  (unreachable_inventory).

The runbook names each behaviour. The red test for simultaneous unions
also resets the outcome schema between its two halves (a fault in the
test, not the validator).

tests/factory-mcp: 59 passed, 91 subtests passed (red at 94ca87e: 12
failed). The review's adversarial probe and the out-of-tree codex and Ops
probes give unchanged output.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Copilot AI balanced review requested due to automatic review settings October 5, 2026 18:50
brettheap and others added 2 commits October 5, 2026 18:59
Failing witnesses for the five findings of Copilot review 5419154777
(at b8c0d5e), none of which c9dbaa9 covered:

- r4187574917: a `$ref` or an inventory pointer into annotation data
  (`#/examples/0` holding a valid-looking `{"enum": [...]}`, or the
  `#/properties` map) is not a schema location.
- r4187574996: a discriminated branch with no `type: object`, here or on
  an ancestor, also admits non-objects, which carry no code.
- r4187575035: human output printed gap text verbatim, so control and
  format characters reached the terminal.
- r4187575076: shared `anyOf` references multiplied the vocabulary work
  (262145 finite() calls for 16 layers).
- r4187575114: U+0085 and other non-ASCII characters passed the fallback
  resource-URI check.

The CLI helper now decodes the child's output as UTF-8 explicitly.
Against c9dbaa9: 9 failed, 61 passed.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- r4187574917: locate() refuses a pointer that ends anywhere but a schema
  location (reference_to_non_schema). That covers annotation data, a map
  or list of subschemas, and, for an inventory, invalid_inventory_pointer.
  Boolean schemas remain schema locations.
- r4187574996: discriminated branches must be object-only, through
  `type: object` on the branch or inherited from an enclosing union or
  `$ref`.
- r4187575035: human output escapes control, format, separator and
  unassigned characters and the backslash in locations and gap text;
  ordinary text, including non-ASCII letters, is unchanged.
- r4187575076: finite() memoizes completed resolutions keyed by node,
  resource, discriminator, inherited `required` and typing. 16 shared
  layers now cost tens of calls, not 262145.
- r4187575114: the resource-URI fallback accepts only printable ASCII.

The runbook names each rule. tests/factory-mcp: 64 passed, 98 subtests
passed (red at 91507ee: 9 failed). The adversarial and out-of-tree
codex and Ops probes give unchanged output.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>

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.

Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
Copilot AI balanced review requested due to automatic review settings October 5, 2026 19:01

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.

Copilot review overview

🔵 Needs a closer look

Validator correctness fixes and owner-controlled disclosure and landing-history decisions remain unresolved.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
Resolved since last review (3)

Comment thread scripts/validate-factory-mcp.py Resolved
Comment thread scripts/validate-factory-mcp.py Resolved
brettheap and others added 3 commits October 6, 2026 02:53
Review 5423269766 at 22b0074: two threads. Each is a synthetic
regression that fails against the unchanged validator (2 failed, 87
passed, 196 subtests):

- r4191064649: a referenced schema whose required property reads
  {"const": 1e9999, "enum": [2e9999]} parsed both to infinity, so the
  contradiction resolved; an overflowing literal must be refused where
  it is parsed (json_number_limit), in a schema and in the declaration.
- r4191064701: the encoded pointer #%2F$defs%2F... was refused as a
  named anchor because the anchor check ran before decoding.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-mcp

- r4191064649: json_loads() parses floats through finite_float(), which
  refuses a literal overflowing to infinity (json_number_limit), in the
  declaration and in every referenced schema alike.
- r4191064701: resolve() percent-decodes the fragment before telling a
  pointer from a named anchor, so #%2F$defs%2F... resolves like
  #/$defs/...

The runbook states both behaviours. Tests: 88 passed, 197 subtests.
Out of tree, the codex (4b12ba83) and Ops (6b7cdaa6) declarations and
the review's adversarial probe return the same reports as before.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
verification.md gains the round's red-first row and the full
pytest-suite pass at fcc52c3; tasks.md T016 now names twelve rounds.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 02:54

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.

Copilot review overview

🔵 Needs a closer look

A validator correction remains necessary, while disclosure and merge-history decisions still require owner review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread scripts/validate-factory-mcp.py Resolved
brettheap and others added 3 commits October 6, 2026 03:05
Review 5423342885 at 9cfba05: one thread. r4191131248: a nonzero
literal such as 1e-9999 or -2.5e-400 underflows to 0.0, so a required
property {"const": 1e-9999, "enum": [0]} in a referenced schema read
as satisfiable, and 1e-9999 in the declaration reached the schema as
zero. The overflow test now covers both (3 failed, 88 passed, 200
subtests).

Guard that passes before and after: real zero literals (0e5, -0.0)
are kept and resolve.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ry-mcp

r4191131248: finite_float() also refuses a literal whose mantissa is
nonzero but whose value underflows to zero (json_number_limit), such
as 1e-9999 or -2.5e-400; real zero literals (0.0, 0e5, -0.0) are kept.

The runbook states it. Tests: 88 passed, 203 subtests. Out of tree,
the codex (4b12ba83) and Ops (6b7cdaa6) declarations and the review's
adversarial probe return the same reports as before.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ndum

verification.md gains the round's red-first row; tasks.md T016 now
names thirteen rounds.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 03:05
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

Copilot review overview

🔵 Needs a closer look

Outcome coverage and inventory projection can still accept incorrect mappings or reject valid ones.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (3)

In code that hasn't changed since last review

Medium severity Exclude inactive dependent schemas from outcome coverage

scripts/​validate-factory-mcp.py:55

dependentSchemas applies only when its trigger property is present, but the outcome graph traverses it unconditionally. In a result union, one branch can reference the mapped status enum normally while another returns stale and references that enum only under dependentSchemas.trigger, with trigger forbidden by additionalProperties: false. The second branch is incorrectly marked covered, leaving stale unmapped without uncovered_outcome_branch. Exclude dependent schemas from outcome reachability and coverage until their conditions are modeled. Keep the reference-integrity walk unchanged and add this inactive-dependency regression.

Medium severity Apply narrowing guard to required-property outcome analysis

scripts/​validate-factory-mcp.py:259

Required-property analysis misses the existing NARROWING guard. A discriminated branch requiring code: "INVALID" and extra: {"type":"string","const":"x","minLength":2} admits no instance, but still projects INVALID; an honest outcomes gap is rejected as resolved_inventory_claims_gap. This constraint is at the property's top level, not within the deferred deeper-property analysis. Apply the narrowing guard here so these unsupported constraints leave the inventory unresolved, and cover both direct properties and $ref chains.

Medium severity Preserve ancestor constraints during outcome projection

scripts/​validate-factory-mcp.py:1011

Projection starts at the inventory pointer and loses applicable ancestor constraints. For example, /properties/status can list positive and negative while a root allOf restricts status to positive. A mapping containing both values passes, but the correct positive-only mapping gets incomplete_outcome_mapping; declaring an outcomes gap instead gets resolved_inventory_claims_gap. Carry applicable ancestor constraints into projection, or conservatively require a gap when they cannot be analyzed. Add a regression for an ancestor allOf narrowing a nested enum.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

SonarCloud disposition at 6ab71267. SonarCloud Code Analysis is not a required check. It reports one new issue, rule S8707, because scripts/validate-factory-mcp.py opens the declaration path that its operator passes on the command line.

That is what this CLI is for: an offline validator, run by an operator or by CI against a declaration file, with no network or service exposure. Every path a declaration references is already containment-checked and refused on a symlink escape in the validator's reference pass.

Disposition: accepted by design for this CLI. The landing admits this one non-required red by name. Every required context passes at 6ab71267, Copilot reviewed that exact head, and 0 of 42 threads are unresolved.

@brettheap
brettheap marked this pull request as ready for review October 6, 2026 03:35
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Sorry @brettheap, your pull request is larger than the review limit of 150,000 diff characters

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDING — lane openXfactory-5, session bbe4d255-02db-4578-840b-09924442e544@Eagle, 2026-10-06T03:37:56Z, PR #1243 into opensoft/openxFactory main

@brettheap
brettheap merged commit 92010d3 into main Oct 6, 2026
16 of 17 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDED — lane openXfactory-5, session bbe4d255-02db-4578-840b-09924442e544@Eagle, 2026-10-06T03:38:15Z, PR #1243 into opensoft/openxFactory main → merge 92010d3; Land add-factory-mcp-conformance on main as Speckit feature 037, with repairs and validator fixes

brettheap added a commit that referenced this pull request Oct 6, 2026
…roduct-standalone-operability (#1144) (#1245)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

**Status: RULED (#656 6013547504); ready to land.** The holder posts READY and lands it.

## What this is

This PR is the Speckit **specification** for **release 2, "the document tool
and self-maintenance" (phases 4–5)**, of the ratified OpenSpec change
`add-neutral-product-standalone-operability` (#1144). It is the
`/speckit.specify` step and its clarify round. Brett Heap answered all 25
questions with option (a) on #656, comment `6003486656`: *"Accept all 25
recommended (Recommended)"*. The answers are encoded at `ce64afc9`. The plan and
tasks are at `6d6911e1`, with review round 1 folded in at `6847e99e`. Brett
ruled the plan there, every item as recommended (#656 `6013547504`); T004
encodes the ruling at `2a4a73d1`, and Copilot's reviews are folded in from
`b7137d5e` to `03adf0e4`, the final head (the holder ruled the convergence).
This PR adds planning documents only; implementation proceeds in the product
repositories on Brett's word.

**One OpenSpec change, two Speckit features (R1Q21 (a)).** #1144 hands off to
feature 034 (release 1, phases 1–3) and to this feature, 038 (release 2). R1Q21
(a) was answered on #656, comment `5850003126`: *"go with recommendations on
all the open questions"*. The change archives only on both releases' merged,
green evidence (`5800995035`).

**Authority.** Brett Heap started release 2 on #656, comment `6001702967`:
*"Start release 2 (Recommended)"*. #1144 was ratified on comment `5815412869`.
Its four release-2 rulings are SEQUENCED, not reopened: `5783934499`,
`5784155201`, `5784247356` and `5784295745`.

Scope:

- phase 4 is Group 12 (requirement 11): submission, and landing;
- phase 5 is Groups 6, 14 and 15 (requirements 6, 14, 15 and 16): the health
  engine, the fix loop, exceptions in git, and check packs;
- Group 11 (the guard) and box 9.5 (the pins) run in every phase;
- Group 8 and the follow-ons F1–F4 are out of scope.

It adds the specification, the plan and the tasks only: no code, no pin, and no
OpenSpec change. It edits no file of #1144. Besides the feature directory, it
adds one line to the README's Documentation index, which links the planning
documents and round 1's evidence.

| file | what it holds |
|---|---|
| `spec.md` | Six user stories: US1 submit (P1, phase 4), US2 land (P1, phase 4), US3 the governed host unchanged (P1, every phase), US4 see health (P2, phase 5), US5 the fix loop and exceptions (P2, phase 5), US6 packs (P3, phase 5). FR-001–FR-025, each naming its #1144 requirement and boxes. Key entities, SC-001–SC-007, Assumptions (each measured at the trees below), and **Risks**. |
| `clarify-questions.md` | **Round 1: R2Q1–R2Q25, all ANSWERED (a)** (#656 `6003486656`). Six are contradictions, and two (R2Q19, R2Q20) ask only whether to amend ratified text. Then 34 questions deferred to the plan, each with a proposed default. Round 2 is empty. A last table maps every candidate. |
| `checklists/requirements.md` | The spec-quality checklist. Its three open items are the questions, realization, and analyze. |
| `plan.md` | Phases, the dependency graph, the single-writer table, the two-lane split, the critical path, pins and landing order; § "Ruled answers, the plan ruling" and § "Design decisions, RULED with the plan" in three tiers (7 rulings, 8 readings confirmed, 52 defaults); § "Conflicts found, and where each was ruled" (21); and a revision note listing every refinement Copilot's reviews made after the ruling, for the holder to judge. |
| `research.md`, `data-model.md`, `contracts/` (five notes), `quickstart.md` | The measurements and decisions behind the plan, the entities, the CLI/HTTP and file contracts, and AT-R2. |
| `tasks.md` | 79 tasks, T001–T093, with box accounting for all 42 open boxes, the falsifier mapping and the writer slices. |
| `evidence/analyze-round-1.md`, `evidence/plancheck-lane3-round-1.md` | Review round 1, verbatim, each with its disposition table. |

## Inputs

- This feature's own reading of #1144's 37 release-2 boxes and the four
  rulings, against the live trees on 2026-10-05 at `main`:
  - openDox-code `a9ac96f9`;
  - openXdox-code `56e1c238`;
  - the openDox root `d77f8cbf`;
  - openxFactory `0f2a87f6`.
- Three read-only inventories by lane openXfactory-3, delegated by this lane
  (#656 `6001723339`, claimed on `6001723764`):
  - R2-INV-12 for Group 12 (`OQ-12-1`…`17`);
  - R2-INV-HEALTH part A for Groups 6 and 14 (`OQ-H-1`…`22`);
  - R2-INV-HEALTH part B for Group 15 (`OQ-H15-1`…`22`).

The 61 inventory candidates and this feature's seven were triaged as follows:

- **To Brett (round 1)** only if the answer changes WHAT the spec requires, and
  #1144 and the rulings do not already decide it.
- **To the plan**, with a proposed default, where the question is
  design-level.
- **Merged** where one answer settles a pair. The merges are OQ-12-4 with -5,
  OQ-12-6 with -7, OQ-H-4 with OQ-H-22's ownership half, OQ-H-5 with
  OQ-H15-6, OQ-H-7 with OQ-H15-17, and OQ-H-12 with OQ-H15-16.
- **The falsifier amendments** are put as ONE question (R2Q9): OQ-H-1,
  OQ-H-6, OQ-H15-22 (a)–(d), and the verbs' `--local`.

## The questions (round 1)

| phase | questions |
|---|---|
| 4 (Group 12) | **R2Q1** "one interface for both" · **R2Q2** `pull_request_factory`'s unset default · R2Q3 whether a governed host carries `submit`/`land`/`health` · R2Q4 the instrument · R2Q5 which branches · **R2Q6** where `land` merges · R2Q7 the default branch and the first declaration · **R2Q8** where 12.5 runs, and its 174 reds |
| 5 (Groups 6, 14, 15) | **R2Q9** seven falsifier amendments as one set · **R2Q10** a finding's `id` · R2Q11 "location" · R2Q12 the baseline · R2Q13 the `0003_` table's ownership · R2Q14 6.1a against 11.1 · R2Q15 hosted · R2Q16 what runs in the sandbox, and what in process · R2Q17 CI and the sandbox suite · R2Q18 pack dependencies · R2Q19 amend for git history? · R2Q20 amend for model access? · R2Q21 `stack.yaml` against `health/packs.yaml` · R2Q25 excerpts in `evidence` |
| release 2's close | R2Q22 openDox-spec and a bundle · R2Q23 PyPI 0.2.0 · R2Q24 AT-R2 |

Bold marks the six contradictions:

- **R2Q1.** The release map's "one interface for both" against 12.1 and
  12.6a's split protocols.
- **R2Q2.** 12.4 against itself, `tasks.md:2500-2511` against `:2513-2519`.
  openXdox-code's protected `test_session_snapshot.py:893-916` pins
  `GhPullRequests`.
- **R2Q6.** 12.6a's `--no-ff` merge against feature 007's served-checkout rule:
  `merge` and `update-ref` are not allowed, and `HEAD` stays unchanged.
- **R2Q8.** F12.1 against the declared exclusion. Fifteen of its 16 suites are
  excluded for `doc_health`. Composed with openxFactory's scripts, the 16 read
  668 passed and 174 red, the same 174 as T086.
- **R2Q9.** F6.1 against batch G, where a bare process refuses. F14.1 and F15.1
  against R1Q16, where the bundle belongs to the document server.
- **R2Q10.** The falsifiers' literal ids against requirement 15's stable
  citation.

## Risks (spec.md § Risks)

- **The reference sandbox is unavailable by default on every target
  measured.**
  - In this lane's container, `bwrap` exits 1, "No permissions to create new
    namespace".
  - GitHub's `ubuntu-24.04` restricts unprivileged user namespaces through
    AppArmor.
  - The hosted pod is inferred to be the same.
  - macOS Seatbelt cannot meet requirement 16.

  So 15.1b's "packs do not run" is the default outcome everywhere. R2Q16
  decides whether the product's own checks still run. R2Q17 decides how CI
  proves the sandbox.
- **12.5 cannot pass in any environment measured** (R2Q8).
- **Three standing invariants stand in the way of four boxes** (R2Q6, R2Q9):
  feature 007's served checkout (12.6a), batch G's empty seam (F6.1), and
  R1Q16's bundle ownership (F14.1, F15.1).

## Where the rulings and #1144's text differ (reported, not settled here)

- `5783934499` said the neutral step "never merges". `5784155201` then said
  "merge yes", and #1144 encodes the later word. No question is raised.
- `5783934499`'s third bullet repoints the unset default, which is a part of
  R2Q2. With R2Q2 (a) and R2Q3 (a), its *"contributed by the governed host"*
  and 12.5's *"With the host's implementation registered"* go unrealized in
  release 2. R2Q2 (a) says so, because only Brett can accept that.
- `5783934499` said "the same injection seam as the generator". #1144 says "the
  same pattern, a different registration point", and FR-003 follows #1144.
- `5784155201` item 4 reads "`0002_`" and "the closure test moved". #1144
  corrects the number to `0003_` (D10.4) and leaves the closed-list
  declaration open. R2Q13 asks for that declaration.
- `5784247356` says "a governed repository gets a pull request". Requirement
  14 says "the governance's own instrument". R2Q4 asks which.
- `5784295745` pins a domain's pack "in its `stack.yaml`", "by commit and
  digest". 15.1a pins it in the corpus's `health/packs.yaml`, by digest alone
  for a corpus-relative source. #1144 decides the digest rule, and R2Q21 asks
  about `stack.yaml`.
- Line citations in #1144's boxes have drifted. This is non-normative, and
  spec.md § Assumptions gives the live lines.

## Fix round: lane openXfactory-3's check (at `43ddf275`), folded in at `0513a3b1`

Lane openXfactory-3 checked R2Q1–R2Q24 read-only and found 10 OK, 14 FIX and
2 MISSING. Every fix was verified against the trees before it was written in,
and the coordinator's rulings on the open points were applied:

- **R2Q1.** The governance query binds the lander alone. `submit`'s port comes
  from injection.
- **R2Q2.** The repoint residue also covers `design.md:1059-1061`. Option (a)
  states what goes unrealized with R2Q3 (a).
- **R2Q3.** The cites are corrected: R1Q4 (a)'s option text, the golden's test
  line, and openXdox-code's 32-entry test.
- **R2Q6.** Feature 007's FR-004 and SC-002 are cited from codexFactory, and
  the promoted scenario from its archived home. Option (a) now lands in a
  worktree and fast-forwards. Round 2 completes its exceptions and its remote
  route (below).
- **R2Q7.** The runtime's HEAD-branch code is measured against option (a).
- **R2Q9.** It uses F13.1's real form, and only F15.1's `health` verbs. There is
  one batch, before phase 4's first checkpoint, and F6.1's stale "Today" text
  is struck.
- **R2Q12.** D12 decides the pack-upgrade half. "New" is now absent from the
  previous default-tip run. Option (a) has a reset forget pending
  disappearances; option (b) derives them from git.
- **R2Q15.** The hosted plane refuses by name and records no finding.
- **R2Q16.** It is restated as what runs in the sandbox, with OQ-H-3 folded in.
- **R2Q17, R2Q18, R2Q22.** Cites and consequences are corrected:
  - `EXPECT_SKIPPED` stays at 11;
  - the conftest lines are `:130-147`;
  - the digest plus the install's version pin what runs;
  - openDox-spec is already the arc's sixth repository.
- **R2Q19 and R2Q20.** Each is now amend-or-keep, with keep recommended.
- **R2Q25 (new).** It asks whether a finding's `evidence` may hold excerpts
  (OQ-H-19).

## Fix round 2: lane openXfactory-3's second check (at `0513a3b1`), folded in at `15c40f0d`

12 of the 14 first-round fixes landed as worded, and R2Q8's 62/55/16/16/3/22
split was confirmed (lane 3 appended an erratum to its inventory). Eight
points were left on four questions:

- **R2Q6.** "The tree restored" is cited at `tasks.md:2910-2911`.
  - Option (a) now counts FOUR exceptions:
    - a new argument check for `merge --ff-only` in the name-only guard, under
      which `("merge", "other-branch")` (`test_session_git.py:523`) still
      refuses;
    - `session_git.py:93`'s stated rule;
    - SC-002's `HEAD` clause and its working-tree clause.
  - The shipped `project push` (RULING C3) pushes a project's BARE repository,
    never a served checkout. So (a) names the route for each kind of checkout,
    and (d) says why a push from the served checkout is still a new act.
- **R2Q12.**
  - A fourth class, "arrived with a pack upgrade", follows D12.
  - Disappearance is measured only between default-tip runs, so the fix loop's
    draft branch does not re-raise a fix in progress.
  - Option (a) is stated as narrowing 14.3's "recomputable from git", a reading
    for Brett.
- **R2Q16.** A host's in-process check runs only at the scoped seam, and its
  results are never stored.
- **R2Q25.** `_CITE_EXCERPT_CHARS` bounds a disposition-citation quote in
  `action`, not document text in `evidence`. F1's consequences are restated
  for both options.

## Clarify answered (at `ce64afc9`)

All 25 answers are encoded in one commit:
- **`clarify-questions.md`:** each answer is written inline, and the Answer
  state is ANSWERED.
- **`spec.md`:**
  - a § Clarifications session of 25 `Q: … → A: …` bullets;
  - every `[NEEDS CLARIFICATION]` resolved, so each FR states the ruled
    behaviour and cites `R2Qn (a)` (18 of 25 FRs changed);
  - a new SC-008 for AT-R2;
  - FR-025 lists the bookkeeping amendments the answers owe #1144;
  - the stories, edge cases, assumptions and risks follow the answers.
- **The checklist:** re-run. Only realization and analyze remain open.

No requirement or scenario of #1144 changes, because R2Q19 and R2Q20 keep the
ratified text. Two interplays between answers are reported to the holder, not
resolved:
- R2Q1 (a)'s "the same in every mode" against R2Q3 (a)'s "no host carries the
  verbs";
- R2Q7 (a)'s `main` against R2Q12 (a)'s default-tip baseline.

The 34 design questions deferred to the plan keep their proposed defaults, for
Brett to rule with the plan.

## Review round 1 (at `6d6911e1`), folded in at `6847e99e`

Two independent read-only reviews, folded in ONE revision on the holder's
rulings: conform to ratified text wherever a conforming route exists, so that
what reaches Brett is short. Each claim was re-measured before it was applied.

- **The Opus review** (`speckit-analyze` plus an adversarial pass; verdict
  "READY after the listed fixes"): 66 rows (ADV-01 to ADV-41, and D1, F1–F10,
  C1–C6, E1–E4, A1–A2, B1–B2). 60 applied, four of them (ADV-09, ADV-10,
  ADV-11, ADV-16) by conforming where the reviewer offered Brett a choice; 2
  left unchanged as the reviewer accepted them (A2, B2); 4 put to Brett (ADV-20,
  ADV-25, ADV-15, B1). One measured cite in the review is disputed: the
  `merge`-absence loop in `tests/test_session_git.py` is at `:563-564`, not
  `:564-565` (`sed -n 560,564p` at `a9ac96f9`).
- **Lane openXfactory-3's PLANCHECK** (125 lines: 34 FIX, 4 MISLABEL, 9 SHARED,
  4 NOT REACHED, 72 OK): 33 FIX applied and 1 put to Brett (CF-5); MISLABEL row
  31 conformed, the other three put to Brett (ARC-5, I-2, CF-6). The lane
  ACCEPTED the split on three conditions, each applied: T021 before T022; T054
  After T047, with openDox-code's copy record in the single-writer table; T073
  moved out of the arc as #1144's requirement-9 work.

The largest changes: `submit`/`land` take 12.4a's and 12.6a's `--repo-root …
--branch …`; `Submission` carries `remote`, `ref` and a redacted `url`, and a
credential-bearing remote is pushed with the report redacted (12.1a); T055
builds 15.6a's eight packs by name; patches are unified diffs only, with
15.2a's refusal list and 65,536-byte bound; nothing is vendored into
openXdox-code's single-source copy record; the root's spec pin and the
`dox-v1.2` cut (T060, on Brett's cut word) move before the copies, which land
T041 → T047 → T054; T061 never waits for the arc; the finding id hashes a
position-independent identity key; a dirty served checkout on `main` refuses
`land`; the store holds no patch text; `health fix … --finding ID [--batch]`
exactly as 14.5 declares; a new CI-owner task (T067) runs F15.1's shell block
in the required job.

**The decisions, in three tiers** (`plan.md` § "Design decisions"):
- **Tier 1, six RULINGS** as multiple-choice questions: R-1 (the staging
  suite's 26 nodes; closes only with W-1), W-1 (the `display.js` route), ARC-5
  (#1144 archives with F9.2 open), I-2 (the baseline in a repository with no
  `main`), N-6 (phase 5 overlapping phase 4's tail), ARC-1 (the arc change's
  `target_release:`).
- **Tier 2, six readings to CONFIRM**: CF-1 (I-1, "every mode"), CF-2 (batch
  Q's twelve items), CF-3 (H-1, the shim), CF-4 (H-2, batch C's scope, with
  both reviews' views), CF-5 (F12.1's composition is permanent), CF-6
  ("optionally on commit" is a documented hook line).
- **Tier 3, 55 proposed defaults**, ruled together.

**Validation (head `6847e99e`)**

| gate | result |
|---|---|
| `python3 scripts/validate-openspec-cli-pin.py --all` | exit 0; `Totals: 110 passed, 1 failed (111 items)`; `every target validated --strict with 0 UNDISPOSITIONED failures`. The one failure is `add-chain-attestation`'s accepted disposition, as on `main`. |
| the feature's self-check | 79 tasks; FR-001–FR-025 and SC-001–SC-008, R2Q1–R2Q25 and the 42 open boxes each map to a task; no dependency cycle |
| the single-writer chain check | every order in `plan.md`'s table is encoded in an After line: 0 problems |
| relative links in the feature directory and the README's feature-038 entry | 0 broken |
| host-absolute path scan of the feature directory | 0 hits outside the verbatim review, whose one line names the four path prefixes its own scan searched for (disclosed in the evidence file) |
| closing-keyword scan (the feature's files and this commit's message) | 0 hits. The README's three hits are lines already on `main`, outside this PR's one line. |

## The plan ruling (#656 `6013547504`), encoded at `2a4a73d1` (T004)

Brett Heap ruled plan 038 at `6847e99e` on 2026-10-06, by interactive
multi-choice, every item as recommended. His answers, verbatim:
- **R-1** *"Admitted edit kind (Recommended)"*; **W-1** *"Model import-free
  again (Recommended)"*; **ARC-5** *"Archive with F9.2 open (Recommended)"*;
  **I-2** *"main, else HEAD's branch (Recommended)"*; **N-6** *"Allow the
  overlap (Recommended)"*; **ARC-1** *"implemented (Recommended)"*; **N-7b**
  *"Make it required (Recommended)"*;
- the rest *"Accept all as recommended (Recommended)"*: CF-1 to CF-8, the
  tier-3 defaults and the two-lane split.

T004 encodes it:
- **`plan.md`**: a new § "Ruled answers, the plan ruling" quotes each answer;
  § "Design decisions" is retitled RULED and marks every item with the option
  taken. N-7b moves into tier 1; OQ-12-12 and OQ-12-16 become tier 2's CF-7 and
  CF-8. **Tiers: 7 rulings, 8 readings confirmed, 52 defaults (67 items).**
- **`tasks.md`**: T004 and T009 ticked; every conditional resolved to the
  ruled option; T063 and T064 now name phase 4's pins in their After lines,
  since N-6 (a) no longer routes phase 5 through T033.
- **`spec.md`**: I-2 (a)'s amendment, every "`main`'s tip" baseline line now
  "the baseline branch's tip (`main`, else the branch HEAD names)", with a
  clarification session for the ruling.
- **The re-checks' five remaining fixes**: packs always see the committed
  export of HEAD (15.1b); the capability keys' presence (openDox's own profile
  only) kept apart from their values (route-derived, as `gate`'s); the phase-4
  openXdox-code `src/` exceptions named; a finding-id collision is a finding
  against its producer; a file only one task ever writes needs no single-writer
  row.
- **Status headers.** `plan.md` and `tasks.md` keep `Status: draft`, as plan
  034's do: the lifecycle's `Ratified by:` line must name an OpenSpec change
  (`docs/document-lifecycle.md` § Status Claim Rules).

## Copilot's reviews, `2a4a73d1` to the final head `03adf0e4`

Every open thread is answered and resolved, each classified under the
convergence rule (#656 `5988818366`).

**At `2a4a73d1`: 18 open threads** (12 from earlier heads, 6 new), folded in at
`b7137d5e`:
- **Fix now (14):** the run's pack inventory, so a zero-finding pack keeps its
  version and a newly added pack's findings are `pack-upgrade` (`4189588543`,
  `4189216774`); `actions.land` true for a bound lander OR a governed instrument
  (`4189588476`, `4190162003`, `4193923461`, `4193923732`); the pack digest's
  tree per source kind (`4193923552`); FR-015's empty stub (`4188845079`);
  FR-005 states CF-5's permanent composition (`4193923610`); AT-R2's gh-free
  PATH (`4189588925`) and fixture git identity (`4189588994`, `4190161965`);
  9.5's tick moved to T084, after the cut's sync and the publish
  (`4190162022`); this body's status (`4193923795`). FR-004 also states CF-1,
  for a thread already resolved (`4189216706`).
- **Accepted limit (2):** a git-URL pack source on an internal host is
  fetchable over https or ssh (the fetch only reads, the digest pins what runs;
  `4188656177`); without a delegated cgroup the process count is unbounded,
  the false claim that a PID namespace bounds it withdrawn and each run
  recording which bound it had (`4190161914`).
- **Documents made consistent, the gate left to the holder (1):** the analyze
  gate (`4193923677`).
- **Not a defect (1):** `openXfactory-3` and `openxfactory-4` are the
  registered lane names (`4188514202`).

**At `b7137d5e`: 2 new**, folded in at `f9cc2d02`:
- **Fix now:** a failing pack's stderr is never stored; its finding carries
  only engine-authored metadata (`4194019231`; tier 3's OQ-H15-11, refined under
  R2Q25 (a)).
- **For the holder at READY:** the analyze gate again (`4194019349`). Brett's
  word starts implementation; round 1's CRITICALs are applied and re-checked;
  that re-check is not a fresh `/speckit-analyze` report; T003 stays open for
  the holder.

**At `f9cc2d02`, the first review: 1 new.**
- **Accepted limit:** a pinned pack could copy a short excerpt into its
  `message` or an evidence string; the engine enforces the bound and the key
  rules, not the meaning (`4194086023`). Engine-owned templates would change the
  ruled finding shape, so that is the holder's to raise.

**At `f9cc2d02`, the second review: 4 new**, folded in at `c93ae88b`, all fix
now: spec's credential edge case now pushes and redacts, as OQ-12-11 ruled
(`4194141741`); engine-authored findings get engine-owned identity keys
(`4194141935`); the last places that ticked 9.5 before the cut's sync and the
publish now name T084 (`4194141993`, `4194142055`).

**At `c93ae88b`: 4 new**, folded in at `2076f24b`, all fix now: the baseline
is the latest earlier default-tip run of the SAME corpus root and baseline
branch (`4194238666`); `list`, `fix` and `accept` read only the resolved
corpus's runs (`4194238615`); SC-004 and the format rule name T084 for 9.5
(`4194238727`, `4194238779`).

**Previously missed items, with no thread** (Copilot lists them in the review
body), every one fix now:
- at `b7137d5e`: the credential behaviour (→ `c93ae88b`); spec § Assumptions
  no longer has the archive wait on the direction arc (ARC-5 (a); → `8cee8007`);
- at `f9cc2d02`: engine-owned identities (→ `c93ae88b`); the identity's
  persistence and disappearance only between complete, full runs (→
  `67d6f28b`); T003's disposition after T004 (→ `8cee8007`); the phase table's
  9.5 timing (→ `cbe2adfb`); SC-004 (→ `2076f24b`);
- at `c93ae88b`: the checklist records the direction arc as ruled (→ `8cee8007`);
- at `2076f24b`: an accepted id is never a disappearance; `identity` is
  engine-internal, never stored or emitted; only a complete, full default-tip
  run becomes a baseline (→ `67d6f28b`);
- at `67d6f28b`: the once-only re-raise is an engine-authored
  `uncited-disappearance` finding with its own id; the phase table splits 9.5's
  row; User Story 3 runs F12.1 composed permanently; FR-025's 9.5 timing (→
  `cbe2adfb`);
- at `cbe2adfb`: the `land` act's two success shapes (`Landed`, or the
  instrument's `Submission`); every repair commit carries a `Finding:` trailer,
  so a landing's citation is read from git (→ `3f807204`);
- at `3f807204`: each run records every pack's exact pin and the commit its
  packs read, and `fix` re-runs a producer only there; every emitted finding
  carries `evidence` (→ `97e28b6c`);
- at `abd28ba2`: one exceptions entry per finding id (→ `8cee8007`);
- at `8cee8007`: `--timeout` takes a whole number of seconds of at least 1 (→
  `6f073ed2`);
- at `6f073ed2`: the baseline compares each pack's exact pin, so a pin moved
  under an unchanged version is `pack-upgrade` (→ `55cc1334`);
- at `55cc1334`: `pack_id` and `kind` bounded at 40 characters; each pack
  family declares its `kind`, own version and `applies_to` (→ `83a347e4`).
- at `83a347e4`, the round the holder ruled the converging one: **accepted
  limit**, `clarify-questions.md`'s record of the composed run says 10 files
  where spec § Assumptions, research R2 and plan C-1 carry the verified 11
  (wording in the answered round's record, not a task's contract);
- at `74dfe79c`, on the holder's ruling: the quickstart spells
  `opendox-runtime runtime migrate` as F14.1 does (fix now → `03adf0e4`); the
  patch-to-finding association is **reported to the holder, not chosen** (§
  below).

**Threads after `2076f24b`**, each answered and resolved:
- at `67d6f28b`: the finding contract's example is the engine's object after
  stamping (`4194458091`, fix now → `cbe2adfb`);
- at `cbe2adfb`: `land`'s remote check reads the chosen remote's PUSH URL,
  several refused (`4194510646`, fix now → `3f807204`);
- at `97e28b6c`: a run is `partial` when any selected pack was not evaluated
  (`4194645168`); `fix` refuses a working-state run's finding, naming commit
  and re-run (`4194645239`); an open batch grows only at its base
  (`4194645294`), all fix now → `abd28ba2`;
- at `8cee8007`: the engine owns id-collision detection, with a path rule for a
  collision across paths (`4195440891`, fix now → `6f073ed2`);
- at `6f073ed2`: **accepted limit**: a 16-digit hash collision ACROSS runs is
  not detected; the id's form is ruled (R2Q10 (a), N-13), the odds by chance
  are about 3 in a trillion for 10,000 findings, and a deliberate one needs
  about 2³² SHA-256 evaluations and can only mislabel a class or suppress one
  finding; recorded in the finding contract, for the holder to raise if he
  wants the id widened (`4195511173`);
- at `55cc1334`: T048 carries 15.1b's complete `bwrap` invocation and tests
  parent death, the new session and the read-only binds (`4195592688`, fix now
  → `83a347e4`);
- at `83a347e4`: a pack's source and pinned tree may hold no symlink, and every
  host-resolved pack path is checked beneath the materialized pinned tree
  (`4195679198`, fix now → `74dfe79c`);
- at `74dfe79c`, on the holder's ruling: `land`'s remote check passes the push
  URL to git only as a transient remote in the child's environment, never in
  argv, and T012 gains `test_the_push_url_never_reaches_git_argv`
  (`4195751210`, `4195751277`, fix now → `03adf0e4`).

**The final round, at `03adf0e4`** (review `5429573631`): "Needs a closer
look", **Findings: None**, no new thread. It lists one previously missed item,
an **accepted limit** under the holder's ruling: `plan.md`'s "Scheduled acts"
row 4 says T010 lands "before any phase-4 or phase-5 slice adds a test", where
only T048's After line encodes T010 (a schedule note's wording; each task's
After line is the contract an implementer follows).

**Reported to the holder, not settled here** (openDox-spec#17, T040's three
schemas at `58383189`, read through the contents API):
- **The patch-to-finding association is open in T040.** Its finding is CLOSED
  (`additionalProperties: false`) and names no patch field, and the pack's
  stdout document is not among its three schemas. So no wire shape is chosen
  here; `data-model.md` § Patch's `finding` field ("the pack's own finding
  reference, before the engine stamps the id") stands as the open point for
  T045.
- **`identity` is REQUIRED in T040's finding**, the shape "`opendox health list
  --json` emits", while this plan since `67d6f28b` makes `identity`
  engine-internal and never emitted. One of the two moves before T041 copies
  the schema.
- **Compatible, noted:** T040's `pack_id` and `kind` patterns are unbounded
  where this plan bounds them at 40 characters, and its dispositions schema
  does not state unique finding ids; the engine's and reader's rules are the
  tighter ones, so T040 need not change for them.

**Threads: 52, 0 unresolved.**

**Validation (head `03adf0e4`)**

| gate | result |
|---|---|
| `python3 scripts/validate-openspec-cli-pin.py --all --strict` | exit 0; `Totals: 110 passed, 1 failed (111 items)`; `every target validated --strict with 0 UNDISPOSITIONED failures`. The one failure is `add-chain-attestation`'s accepted disposition, as on `main`. |
| the feature's self-check | 79 tasks (four done: T004, T006, T007, T009); FR-001–FR-025, SC-001–SC-008, R2Q1–R2Q25 and the 42 open boxes each map to a task; no dependency cycle |
| the single-writer chain check | every order in `plan.md`'s table is encoded in an After line: 0 problems |
| tier counts in `plan.md` | 7 rulings, 8 readings confirmed, 52 defaults (67 items) |
| relative links in the feature directory and the README's feature-038 entry | 36 checked, 0 broken |
| host-absolute path scan of the feature directory | 0 hits outside the verbatim review in `evidence/analyze-round-1.md`, whose one line names the path prefixes its own scan searched for (disclosed there) |
| closing-keyword scan (the feature's files, the README entry, and the 16 commit messages since `6847e99e`) | 0 hits |
| `git merge-tree` of this head against `main` (`92010d3e`) | clean |

## Validation (head `ce64afc9`)

| gate | result |
|---|---|
| `python3 scripts/validate-openspec-cli-pin.py --all --strict` | exit 0; `Totals: 110 passed, 1 failed (111 items)`; `every target validated --strict with 0 UNDISPOSITIONED failures`. The one failure is `add-chain-attestation`'s accepted disposition, as on `main`. |
| `[NEEDS CLARIFICATION]` markers in spec.md; answers in `clarify-questions.md`; `Q: → A:` bullets in § Clarifications | 0 markers; 25 of 25 answers inline; 25 of 25 bullets |
| the candidate map | 61 of 61 inventory ids mapped, plus this feature's seven; round 1 holds 25 of 25 slots, and 34 are deferred to the plan |
| R2Q8's composed run, re-measured (openXdox-code `56e1c238`, openDox-code `a9ac96f9` installed, openxFactory `0f2a87f6` `scripts/` on `PYTHONPATH` with its `openDox` and `openXdox` submodules initialized, each of the 16 suites run alone) | 668 passed, 170 failed, 4 errors: 174 red in 10 files, as R2-INV-12 and T086 recorded |
| relative links in the four changed files | 427 checked. 1 is broken, `docs/ideation-dashboard-session-runbook.md` at README line 223. It is already broken on `main` at `0f2a87f6`, and this PR does not touch that line. |
| host-absolute path scan of the feature directory | 0 hits |
| closing-keyword scan (the feature's files and all five commit messages) | 0 hits. The README's three hits are lines already on `main`, outside this PR's one line. |

## Process

- **No Rule 6 window is needed.** This PR touches no `openspec/changes/`
  directory, and not the README's OpenSpec Records block. Its one README line
  is in the Documentation index, after feature 034's entry.
- **No `Arc:` trailer.** Spec authoring is bookkeeping (R1Q20 (a)).
- **Sibling reads.**
  - `gh pr list -R opensoft/openxFactory --state all --head
    038-opendox-document-tool-self-maintenance`: none.
  - Feature numbers 035 and 036 are taken by the review branches
    `review/20261004-review/branch-035-…` and `…-036-…`, and 037 by #1243, so
    this feature is 038.
  - #1243 (feature 037) landed as `92010d3e`. It changes other README lines;
    `git merge-tree` of this head against that `main` reports no conflict.
- **Clarified, then planned.** Brett's answers are encoded at `ce64afc9`.
  The plan writer's `/speckit-plan` and `/speckit-tasks` landed at `6d6911e1`:
  `plan.md`, `research.md`, `data-model.md`, `contracts/` (five notes),
  `quickstart.md` (AT-R2) and `tasks.md` (77 tasks, T001–T093). They fold in
  Brett's ruling of the `doc_health` direction arc, ARC-Q1–ARC-Q4 all (a)
  (#656 `6003918488`), and credit lane openXfactory-3's inventories.
- **Review round 1 folded** at `6847e99e` (above). The README's entry now
  links the planning documents and both evidence files (Principle IV; D1).
- **Ruled.** Brett ruled the plan, every item as recommended (#656
  `6013547504`); T004 encodes it at `2a4a73d1`. Copilot's reviews are folded
  in through `03adf0e4`, where the holder ruled the convergence. Still his word, at the act:
  the `dox-v1.2` cut (T060), the arc change's ratification (T071) and the
  0.2.0 publish (T084).
- **Ready to land.** The holder posts READY and lands it.

Lane: openxfactory-4

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
The governed wrapper refuses to archive a change with an open box, so 3.2
is ticked before the run. Its condition, merged and green realization, is
recorded at 3.1. The run itself is the next commit, and its output and the
promotion's measurements are recorded under 3.2 in the commit after that.

The archive is prepared on a DRAFT pull request. It lands by merge commit,
never squash, and only on Brett Heap's archive word, which has not been
given.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
…nce capability after realization 92010d3

PREPARED, NOT YET AUTHORIZED. This commit is the archive act, carried on a
DRAFT pull request. It lands by merge commit, never squash, and only on
Brett Heap's separate archive word, which has not been given.

WHY IT MAY ARCHIVE. code_surface is non-empty (openxFactory), so under
release-realization the packet archives on merged-plus-green realization
evidence, and that evidence exists. The realization, Speckit feature 037,
landed as PR #1243 -> 92010d3
(2026-10-06T03:37:58Z, by squash from head 6ab7126, whose tree it carries
unchanged) on Brett Heap's word "land #1243 when green". Every required
context passed at that head, and pytest-suite decided success on main at
92010d3 itself, run 37409899722 (selected=9831 passed=9825 skipped=6
failures=0 errors=0). Task 3.1 cites the rest.

PERFORMED THROUGH THE GOVERNED WRAPPER, never a bare openspec archive:

    TZ=UTC python3 scripts/proposal-support.py . archive \
        add-factory-mcp-conformance --yes

exit 0, run 2026-10-06T16:21:19Z to 16:21:30Z:
  ORIGIN RETAINED add-factory-mcp-conformance (declaration unchanged since
    the ratifying commit 92010d3)
  Totals: 1 passed, 0 failed (1 items)
  Task status: Complete
  factory-mcp-conformance: create
  Applying changes to openspec/specs/factory-mcp-conformance/spec.md: + 8 added
  Totals: + 8, ~ 0, - 0, -> 0
  Change 'add-factory-mcp-conformance' archived as
    '2026-10-06-add-factory-mcp-conformance'
  NO SUPPORTING DOCS (origin retained, nothing to package)
The CLI is the content-addressed @fission-ai/[email protected] pin, not the
1.13.1 on PATH. --date was not passed, so the directory takes today in UTC.

ORIGIN, ACROSS BOTH HISTORIES. On main the ratifying commit is the squash
92010d3, the first commit there whose proposal.md says Status: ratified.
On the original lineage it is 54bce01. The .openspec.yaml blob is c1e5cd9
at 54bce01 and in the archive, so the origin block has not moved since
ratification on either reading. openspec/origin-dispositions.yaml is not
edited.

THE PROMOTION, MEASURED BY CONTENT. The delta is all ADDED over a new
capability directory: openspec/specs/factory-mcp-conformance/spec.md, its
Purpose taken from the delta's own Purpose section and eight requirements
with twenty-two scenarios. Each requirement block was extracted by heading
from the archived delta and from canon, and hashed; all eight are
byte-identical (828, 945, 941, 767, 951, 826, 1,039 and 1,251 bytes). Canon
holds no requirement the delta lacks. Capability directories go from 66 to
67, and no other file under openspec/specs/ changes.

THE PACKET MOVES AS NINE R100 PURE RENAMES; the 3.1 and 3.2 ticks landed in
the two commits before this one.

README: the doc index now points at the promoted specification, with the
archived proposal beside it, and the OpenSpec Records bullet moves from
Active to the head of Archived. Its pull-request link carries the
ARCHIVE-PR-NUMBER-PENDING marker until the pull request exists.

NOT IN THIS COMMIT. The sweep-ledger row is seeded once a pull-request
number exists. The wrapper run is recorded under the archived 3.2, and the
links the move breaks are repointed, in the commits after this one.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
The run happened in the commit that moved this directory (7102cd4). This
commit records it under 3.2, as the item's pre-run tick said it would. It
records the wrapper's decisive lines, the promotion verified by content
(eight requirement blocks, each byte-identical between the archived delta
and canon), and provenance: nine R100 renames, the origin block unchanged
since ratification on both histories, and the original commits reachable
through refs/pull/1243/head.

It also names one relative link in the archived proposal.md that now
resolves one level short. Those bytes are kept as ratified, because
repairing an archived record needs a recorded ruling first. And it names
the items this archive does not settle, which still await Brett Heap's
rulings.

tasks.md only; no requirement or scenario text moves.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
Eight markdown links outside the packet named its active path. They now
name openspec/changes/archive/2026-10-06-add-factory-mcp-conformance/: two
in the runbook docs/factory-mcp-conformance.md, one in the brainstorm
factory-mcp-overview.md, and five in Speckit feature 037 (data-model.md,
spec.md twice, verification.md twice). This is the shape 687b85e used for
feature 005 after its packet archived.

The quickstart's third command, validate-openspec-cli-pin.py --change
add-factory-mcp-conformance --strict, refuses once the change is archived
(exit 2, pin-report-unreadable, measured in this clone). It now runs --all
--strict, with a sentence saying why and linking the promoted
specification. verification.md's record that --change passed at a12c702
stays as written, because it reports a measurement taken then.

Every markdown link whose target names factory-mcp-conformance resolves
(31 checked, 0 broken), and no file names the active path any more. Link
targets only; no requirement or scenario text moves.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
…l request in the README

--moved-by needs a real pull-request number, and this branch had none until
#1252 was opened, so the row is seeded here rather than in the archive act.
That follows the order 5216c70 and 97d9fa5 used.

Seeded by the machine, not by hand:

  python3 scripts/validate-sequenced-after.py . --seed-ledger --moved-by '#1252'
  -> wrote tests/sequenced_after/corpus-ledger.yaml (231 rows, 1 moved by #1252)
       - add-factory-mcp-conformance
  python3 scripts/validate-sequenced-after.py . --ledger-diff
  -> per-change sweep ledger consistent with the corpus (231 rows)

The diff is one line: state active -> archived, moved_by "#1243" -> "#1252",
and moved_on 2026-10-05 -> 2026-10-06. A flipping row takes its archive
directory's date. No other row moved.

README: the archived bullet's ARCHIVE-PR-NUMBER-PENDING marker (two
occurrences, one line) now names PR #1252.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 6, 2026
Brett Heap gave the archive word on 2026-10-06, in session, verbatim
"archive add-factory-mcp-conformance when green". It is RULED in
opensoft/brett-wip lanes/log/openXfactory-5.md at 2026-10-06T17:25:24Z
(commit 5f02a237), against openspec/changes/add-factory-mcp-conformance.
No GitHub comment carries it, so the register entry and this record are
where it lives.

The archived tasks.md 3.2 gains one bullet naming the word, its date and
the RULED cite; the pre-run tick text, which says the word had not been
given when the box was ticked, stays as written. The README archived
bullet now quotes the word with the same cite, in place of the sentence
that deferred it to the landing lines.

The pull request still lands by merge commit, under a Rule 6 window, once
its gates, checks and Copilot review are green. No requirement or scenario
text moves.

Refs #1243

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Land add-factory-mcp-conformance (adopted from lane mcp-family-contract): rebuild on main, repair, and validator fixes

2 participants