Skip to content

docs(examples): replay host-review cards on Agents Shipgate 1.3.0 - #1197

Merged
pengfei-threemoonslab merged 47 commits into
mainfrom
codex/p2-798-replay-host-review-cards
Nov 18, 2026
Merged

pengfei-threemoonslab merged 47 commits into
mainfrom
codex/p2-798-replay-host-review-cards

Conversation

@pengfei-threemoonslab

Copy link
Copy Markdown
Contributor

Refs #798

Replay all three constructed host-review histories and the malformed control with the published Agents Shipgate 1.3.0 wheel. Record the exact wheel digest, contract, Python version, checked-in history references, and current comparison outcomes alongside the original 1.1.0 captures.

The shell and remote MCP results retain the recorded review facts. The workflow row adds an access label with the same high widening. The malformed control remains incomparable. All 72 focused regression tests and exact-head Agents Shipgate verification passed.

Distribution, participant observations, and browser playback remain open. Codex authored this draft. Human diff review is pending.

@pengfei-threemoonslab
pengfei-threemoonslab marked this pull request as ready for review November 17, 2026 21:38
…a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)
* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes
* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references
…1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance
* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change
…#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison
)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing
* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence
* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files
* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins
…d Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest
* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection
* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site
Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.
Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.
* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry
* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes
* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries
…imit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.
* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors
* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors
…#1200)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* fix(host-diff): bind command-setting script bytes
* fix(cli): emit structured recovery for handled command errors

* test(cli): assert worker refusal through exit code and stderr

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented comma…
* fix(cli): emit structured recovery for handled command errors

* test(cli): assert worker refusal through exit code and stderr

* fix(cli): fail closed on unread inputs and missing fixture evidence
…#1194)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(inputs): retain JSONC and JSONL data and type malformed input errors (#1043)

* fix(inputs): bound YAML expansion and structured nesting (#1043)

* Run PR checks against main after retargeting

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_r…
* fix(identity): stabilize expiry, TOML evidence and local repository IDs (#1034)

* fix(control): preserve distinct remote-less workspace identities

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holdi…
…ncating (#1079) (#1187)

* fix(privacy): redact the capability lock family and redact before truncating (#1079)

capabilities.lock.json, both capability-lock-diff files and both capability
delta attestations were built from unredacted capability facts, so a key in a
tool name, owner (controls.evidence_owner), scope, authority source or source
pointer was published verbatim, including in changed[] rows and
semantic_changes[].

Redact where the lock is assembled, before any digest is taken, and where a
lock is read back. Each capability digest whose input redaction changed is
recomputed over the redacted text by one shared recipe, and the id follows
identity_hash, so every published digest (ids, set hashes, payload subject
keys and set digests) describes the published text and the reference consumer
accepts the attestations. A fact or lock with nothing to redact keeps every
byte; an old lock reads back as the fresh export. Two capabilities that
redaction would merge keep their source identity digests.

Redact before cutting text to a length: the n8n HTTP path hint (200), skill
excerpts (180), and the Python reader's expression text (160) and source-slot
refusal rows (1,024) cut first, so a credential straddling the cut published
its head. New core.privacy helpers redact_and_truncate / truncate_redacted
never cut inside a redaction marker.

The #1077 leak test no longer excludes the lock family. STABILITY gains a
migration note and rewords the #1026 note's sentence about the lock family.

* fix(privacy): redact instruction previews and Git diagnostics before bounding; correct the lock digest claims (#1079)

Review cycle 1 on #1187.

- The agent's instructions.value_preview (OpenAI and Anthropic prompt
  files, ADK instruction) was cut to 500 characters before report-time
  redaction, so a key across the cut published its head in report.json and
  packet.json. Git's diagnostic in a verify diff status was bounded to 240
  characters and never redacted. Both now go through redact_and_truncate /
  truncate_redacted, with a straddle test for each source type.
- Read-time redactions are not counted in privacy_audit. Documented in the
  migration note with a link to #586, and pinned by two tests that name it;
  the counting itself is left to #586.
- STABILITY, CHANGELOG and docs/capability-standard.md no longer say every
  published digest describes what is shown: tool_id (tool_v2_) and the
  observation ids (obs_v1_) are digests of source text a reader cannot
  recompute and can check by dictionary, as on main.
- The collision fallback's diff rows are best effort and reachable only with
  name-derived tool ids; the docstring, STABILITY and the test say so.

* fix(privacy): drop a cut word at the Git stderr capture limit and never cut through a marker (#1079)

Review cycle 2 on #1187.

- The Git stderr capture keeps the first 8 KiB; a token cut at that limit
  could land in the 240-character diagnostic too short for any rule. When
  the capture fills the limit, its last word is dropped before decoding.
- verify's headline title (_bounded, _bounded_bytes) and an evidence gap's
  headline subject bound already-redacted text but could cut through a
  [REDACTED:...] marker and publish half of it. Both now cut with
  truncate_redacted.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(p…
…ions (#1196)

* fix(inputs): preserve constructor evidence for bounded Python expressions (#1037)

* test(ci): align generator comparison and stabilize the wheel fixture

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they …
… a tool's row (#1146 follow-up) (#1214)

* fix(application): code that can rebind the agent module's names keeps a tool's row (#1146 follow-up)

* docs(changelog): amend #1146's compatibility sentence and record the rebinding follow-up's corpus result (#1146)

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(application): rebinding reasons survive copy, every unread import counts, and a caller's namespace write keeps the row (#1146 follow-up)

* docs(changelog): the rebinding follow-up counts every unread import and a caller's namespace write (#1146)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result mo…
* Resolve nested scan paths in SARIF

Refs #1047

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached…
…and stale-manifest checks read the catalog (#1035) (#1164)

* fix(checks): keyword evidence no longer blocks or gaps three checks, and stale-manifest checks read the catalog (#1035)

Applies the owner's #1055 ruling (Option A: lexical heuristics never move
the verdict) to the checks #1035 names, through one in-process catalog
flag, advisory_when_policy_ineligible: an instance whose only weakness is
inferred_keyword/inferred_regex evidence is published as a non-blocking
advisory finding and raises no evidence gap.

- SHIP-ACTION-EFFECT-ESCALATED blocks only when the head effect can drive
  hard controls and a policy-eligible claim places it above the base;
  a keyword-only escalation is a medium advisory with keyword_heuristic
  provenance and inferred_keyword support. SHIP-ACTION-SAFEGUARD-REMOVED
  takes the same guard; a removed rollback is critical only for an
  established destructive effect.
- SHIP-SCOPE-PROHIBITED-TOOL-PRESENT compares whole-word stems, needs two
  shared words including an action verb, ignores more connectives, and is
  a medium advisory instead of a non-waivable gap.
- The stale-manifest checks compare with the tool catalog: an entry naming
  a catalog tool whose binding is not established says so
  (issues: [binding_not_established]) and gets a manual keep-the-entry
  patch, never a remove_pointer patch.

Goldens regenerated with scripts/regenerate_goldens.py; sample decisions
do not move.

* fix(checks): prohibited-action matches keep their leading verb, and advisories never count as coverage (#1035)

Review of #1164:

- The prohibited-action matcher needed a verb from a closed list, so
  "buy stock without approval" against broker.buy_stock published
  nothing at all. A shared word now counts as the verb when it is the
  prohibited action's leading word; ACTION_VERBS is widened, and an
  explicit ACTION_SYNONYMS table joins delete/purge/remove,
  update/modify/edit/change, buy/purchase and the like. "shut down"
  reads as shutdown, "e-mail" as email, and a tool named for the
  safeguard a "without" clause names (send_email_preview) is not the
  prohibited action.
- Lexical advisories are labelled, not counted: misalignments say
  "Advisory (lexical evidence, does not gate)", sort last and suggest
  no scenario; capability_facts ignore them; the packet's evidence
  matrix lists them as notes, so no coverage status moves.
- The end-to-end rewording test pins review_required (the remaining
  SHIP-MCP-PERMISSION-EXPANDED review item, #1055), and the STABILITY
  note no longer claims the verdict equals the head scan's; it records
  the fingerprint rotation of a keyword-only critical rollback removal
  and that the matcher also widens, as advisories only.

* fix(checks): prohibited-action matches pair a verb with its own object, and a partial safeguard word no longer hides one (#1035)

Review of #1164, cycle 2:

- The "without" clause skipped any tool whose name shared one word with
  it, before the risk-tag rules ran, so "send email without customer
  consent" against send_customer_email published nothing. The word
  comparison is now skipped only when the tool name contains every word
  of the clause (send_email_preview for "without preview"), and the
  risk-tag rules always run.
- The leading word counted as the verb even when the action held a listed
  verb, synonyms mapped nouns to verbs, and any tool word could pair with
  the verb. The action's verbs are now its listed verbs (joined by
  or/and), else a noun naming one, else its leading word; its direct
  object ends at a preposition. A tool clause (its name's verb and what
  it acts on, or the description's leading verb and object head) must
  share both. Synonyms are verb to verb and apply in verb position only,
  so github.create_issue, close_ticket and delete_comment no longer match
  unrelated prohibited actions.

* fix(checks): prohibited-action matching prefers recall: two shared words, one the action's verb (#1035)

Review of #1164, cycle 3 (coordinator ruling: recall over precision, since
every outcome is an advisory):

- Drop the tool-side clause parser and its TOOL_VERBS/preposition
  machinery. It missed genuine matches main made: a verb that is not the
  description's first word (crm.cleanup "Permanently delete customer
  records."), list objects, noun-first multi-word names
  (records.bulk_delete), non-adjacent second verbs, and "deletion of".
- The rule is now the tool's name and description sharing two words with
  the action, one of them the action's verb: every listed verb it
  contains, else a nominalisation, else its leading word. Synonyms and
  nominalisations apply to every word on both sides. The whole-clause
  "without" rule stays, and the risk-tag rules always run.
- Homographs and shared generic nouns that still match (issue refunds vs
  github.create_issue, close customer accounts vs close_ticket) are
  documented as known advisory false positives, not tested as matches.

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)
…
* test: cover the six reported verdict mutations (#1155)

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did b…
* test(adoption): collect and repair deterministic agent tasks (#1048)

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.…
…-map (#1121) (#1126)

* feat(capability): record tool definitions in the capability lock (#1117)

A change to an MCP tools/list entry's description, output schema or
annotations, with its name and arguments unchanged, produced a lock whose
facts and set hashes were identical and a lock diff reading `changed: 0,
unchanged: 1`, while verifier.json `capability_review` already said
`tool definition changed`. A reviewed lock compared later could not see the
change a tool-poisoning or rug-pull edit makes.

Capability standard 0.6 (lock 0.9, lock diff 0.10):

- each fact built from a tool carries `definition`, digests of the
  stripped description, the output schema and the annotations; never text
- the lock gains `hashes.definition_set_hash`; lock refs carry it
- the lock diff gains `definition_changed[]` rows naming exactly the parts
  that moved, independent of the semantic buckets, with no direction
- capability-lock-diff.md gains a "Tool Definitions Changed" table
- a 0.8 lock still loads; pairing it with a 0.9 lock is refused with the
  re-export command

Unchanged: release_decision.decision, findings, exit codes,
CapabilityHashName, the report and verifier schemas, and the frozen
shipgate.capability_payload/v1 (documented: it does not carry definitions).

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* feat(capability): publish capability_payload/v2 with tool-definition digests (#1117)

The lock now records a tool's definition, but the frozen
capability_payload/v1, and so the exported capability-delta attestation,
could not carry it: a rewritten tool description was still not a row in
the attestation. v1 is closed, so this publishes v2 beside it, as the
payload's evolution policy prescribes.

- shipgate.capability_payload/v2: every record's digests gain
  description_hash, output_schema_hash and annotations_hash (the lock's
  digests, under the lock diff's part names), null together when no
  definition is stated; changed_dimensions may name them; they are
  inside capability_set_digest. A definition-only change is a changed
  row with direction unknown and no explanations. Every other rule is
  v1's: the v2 models subclass v1's
- capability-delta/v2 predicate and shipgate.capability_delta_attestation/v2
  wrap it with v1's envelope rules
- verify writes capability-delta-attestation.v2.json beside the
  unchanged v1 file; the authorization closure, stale-file cleanup and
  PR comment know the new artifact
- contract --json and .well-known name the v2 versions, schema paths,
  predicate type and artifact in six fields beside v1's (runtime
  contract v42, unreleased)
- tools/verify-capability-delta.py 1.1.0 verifies both versions,
  choosing by predicateType
- v2 schemas and worked examples generated; v1 files byte-identical

No verdict, release decision or exit code changes.

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* feat(attest): record who approved the change from host-supplied reviews (#1118)

An attestation recorded who triggered the run (org.actor) and what the
manifest declared (human_ack), but not who approved the pull request, so a
ledger could not answer "who approved this change to what the agent may do".

- `attest --reviews <file>` reads the JSON array GitHub's pull request
  reviews API returns, fetched by the workflow, and records `approval`
  (attestation 0.6): approved / approved_stale / changes_requested /
  not_approved against the attested head, approvers, standing change
  requests, and ignored approvals by the author or a bot
- the file must be outside the repository (Git work tree around cwd or
  verifier.json, GITHUB_WORKSPACE, or a committed link); a review naming
  another pull request is refused; exit 3 either way
- status is recomputed from the rows on read, so a hand-edited attestation
  that claims an approval its rows do not support is rejected
- the lock binding records definition_set_hash and the diff summary
  definition_changed (capability standard 0.6)
- registry rows carry approval_status/approval (registry 0.5); summary
  counts by_approval_status; old rows keep their ids and chain hashes
- org bundle upgrades a 0.5 attestation to 0.6 as not_supplied

The engine calls no API, and the approval never changes the verdict, the
release decision, an exit code or the bypass rule.

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* fix(attest): bind the approval to the verified commit; validate it in the ledger (#1118)

attest --reviews evaluated the reviews against the event's (or --head-sha's)
head commit, which nothing tied to what the receipt-bound verify run
evaluated. A run at commit A with an event and reviews naming commit B
recorded `approved` for B beside A's evidence. The reviews are now evaluated
against the head commit of the plan the validated receipt binds, and attest
exits 3 when that commit is not the pull request's head (a synthetic merge
checkout, another revision's artifacts), when --head-sha names another
commit, when verify evaluated uncommitted working-tree changes, or when no
receipt is beside verifier.json. The docs workflow verifies the PR head.

registry ingest copied the approval block from raw JSON, and the row model
held it as a dict, so a block AttestationApprovalV1 rejects (approved with no
approver) was ingested, verified ok and counted as approved. The row model
now validates the block as the attestation model does and requires
approval_status to be its status: ingest refuses such an attestation (exit 3)
and every reader skips such a ledger row, which registry verify reports.

* feat(registry): record scheduled drift comparisons as ledger rows (#1119)

`audit --host --drift` and `capability diff` compare the repository with
its approved state, but a scheduled run's result lived only in its
workflow log: a team could show its monitoring configuration, not a
record that monitoring ran, what it compared against, or what it found.

- `registry ingest --observation <audit --host --drift --json>` (and
  optionally `--capability-diff` from the same run) appends a
  `drift_observation` row (registry 0.6), chained with the attestation
  rows of its repository: the declared `--event-time` (required, UTC),
  commit and run (`--ci-context github-actions` or flags), baseline and
  lock identities, status (drift / incomparable / clean, recomputed on
  read), and each moved grant, artifact or capability by id, kind and
  direction
- copies no command, argument, URL, env value, rule text or tool
  description; an absolute baseline path is reduced to its name
- idempotent per run; two clean runs on two days are two rows
- `registry report --drift [--repo --since --until
  --expected-interval-days --fail-on-drift]` counts runs with drift,
  runs that could not compare, and gaps between runs (window edges
  included); exit 20 on any with --fail-on-drift
- observation rows are never bypass candidates; summary counts
  by_row_kind and by_observation_status and keeps release counts to
  attestations
- `row_kind: attestation` and `observation: null` are left out of row
  hashes, so earlier ledgers keep their ids and chain
- docs/post-approval-monitoring.md: what an observation establishes and
  does not, a two-job daily and on-push workflow with a protected
  `shipgate-ledger` branch and one `shipgate:drift` issue, and reading
  the record; the copyable examples/ file waits for the release that
  ships `--observation`, since recipe pins must name a published release

The engine reads no clock and calls no API, and an observation changes
no verdict, release decision or verify exit code.

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* feat(registry): write an audit-window evidence extract with --control-map (#1121)

A team preparing an assessment turned the ledger into evidence by hand,
and a hand-made summary cannot be checked against the ledger it came
from.

- `registry report --control-map <map> --since --until
  [--expected-interval-days] [--repo] [--out <dir>] [--json]` arranges
  one window of ledger rows by a control map: per evidence item, the
  cited row ids, counts, and every gap a closed set of rules finds,
  printed as found, none or not_checked
- gap rules: no_rows_in_window, observation_interval (the drift
  report's rule), observation_incomparable, inventory_issues,
  capability_comparison_absent, definition_digests_absent,
  approval_not_supplied, approval_not_approved
- --out writes control-evidence.json (control evidence 0.1),
  control-evidence.md and ledger-extract.jsonl: the cited ledger lines
  byte for byte, plus the last observation of a repository the window
  holds none of; the printed recompute command over the extract gives
  the same controls block (tested)
- maps are data (control map 0.1); docs/control-maps/aiuc-1.yaml covers
  AIUC-1 B006 and E004 as the April 2026 evidence list numbers them and
  lists B006.2 (runtime monitoring) and E004.2 (code signing) as not
  evidenced by the ledger
- byte-identical output for the same arguments on any machine; no word
  in it judges a control (tested)
- docs/control-evidence.md, schemas, STABILITY, CHANGELOG

Built ahead of the assessor question in the gate issue at the owner's
request; opened as a draft. Exits 0 whatever it finds: evidence, not a
gate.

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* test(registry): read the --expected-interval-days usage error as plain text

The click range error for `--expected-interval-days 0` is rendered by rich,
which colours option names when GITHUB_ACTIONS is set, so in CI the option
name in the message was split by escape codes and the assertion failed
(suite shard 3 on #1125). The flag test now invokes with NO_COLOR and
without GITHUB_ACTIONS/FORCE_COLOR, as tests/test_actions_token_scope.py
does, and strips any styling left before matching.

* fix(registry): an incomparable host comparison is always a gap; the extract recomputes from --out on any OS (#1121)

observation_incomparable tested the row's status, which reports capability
drift before host incomparability, so a run whose capability diff drifted
while its host comparison could not be made cleared the rule; with an old or
unsupported baseline (no inventory issue) B006.1 then reported no comparison
gap at all. The rule now reads host.comparison_status.

With --out the printed command named ledger-extract.jsonl relative to the
output directory but the map by the caller's path, so the documented form
(a relative map, then the command run inside --out) exited 2. --out now
writes the map's bytes as control-map.yaml and the command names that copy.

The four files are written as exact bytes with \n line ends. A text-mode
write on Windows turned each \n into \r\n, so the extract no longer hashed to
the view's extract.sha256.

The control-map fixtures now build approval blocks attest could write: the
ledger refuses a bare {"status": "approved"} since #1118's fix.

* feat(attest): record who approved the change from host-supplied reviews (#1118)

An attestation recorded who triggered the run (org.actor) and what the
manifest declared (human_ack), but not who approved the pull request, so a
ledger could not answer "who approved this change to what the agent may do".

- `attest --reviews <file>` reads the JSON array GitHub's pull request
  reviews API returns, fetched by the workflow, and records `approval`
  (attestation 0.6): approved / approved_stale / changes_requested /
  not_approved against the attested head, approvers, standing change
  requests, and ignored approvals by the author or a bot
- the file must be outside the repository (Git work tree around cwd or
  verifier.json, GITHUB_WORKSPACE, or a committed link); a review naming
  another pull request is refused; exit 3 either way
- status is recomputed from the rows on read, so a hand-edited attestation
  that claims an approval its rows do not support is rejected
- the lock binding records definition_set_hash and the diff summary
  definition_changed (capability standard 0.6)
- registry rows carry approval_status/approval (registry 0.5); summary
  counts by_approval_status; old rows keep their ids and chain hashes
- org bundle upgrades a 0.5 attestation to 0.6 as not_supplied

The engine calls no API, and the approval never changes the verdict, the
release decision, an exit code or the bypass rule.

Agent-authored with Claude Code (Claude Opus 5.5); a person must read the
diff before merge.

* fix(attest): bind the approval to the verified commit; validate it in the ledger (#1118)

attest --reviews evaluated the reviews against the event's (or --head-sha's)
head commit, which nothing tied to what the receipt-bound verify run
evaluated. A run at commit A with an event and reviews naming commit B
recorded `approved` for B beside A's evidence. The reviews are now evaluated
against the head commit of the plan the validated receipt binds, and attest
exits 3 when that commit is not the pull request's head (a synthetic merge
checkout, another revision's artifacts), when --head-sha names another
commit, when verify evaluated uncommitted working-tree changes, or when no
receipt is beside verifier.json. The docs workflow verifies the PR head.

registry ingest copied the approval block from raw JSON, and the row model
held it as a dict, so a block AttestationApprovalV1 rejects (approved with no
approver) was ingested, verified ok and counted as approved. The row model
now validates the block as the attestation model does and requires
approval_status to be its status: ingest refuses such an attestation (exit 3)
and every reader skips such a ledger row, which registry verify reports.

* fix(inputs): preserve constructor evidence for bounded Python expressions (#1196)

* fix(inputs): preserve constructor evidence for bounded Python expressions (#1037)

* test(ci): align generator comparison and stabilize the wheel fixture

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1…
* docs(schemas): generate a current contract index

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_…
* test(docs): guard agent-facing schema version claims (#1039)

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the c…
)

* feat(benchmark): retain pinned application replay evidence

* fix(benchmark): refuse invalid and mismatched replay output

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  document…
* docs(benchmark): locate source changes in the zero-row cases

* test(benchmark): replay the changed-lines probe across pinned cases

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.u…
…ce 2026-10-02 (#1158) (#1205)

* feat(benchmark): pin the application holdout from the window open since 2026-10-02 (#1158)

Walk the frozen holdout rule as written and commit its 30 members.

- Listed every pull request created since 2026-10-02T00:00:00Z in the
  8,126 pool repositories (34,936; GitHub GraphQL, read-only, cross-checked
  with issue search) and applied steps 2 and 3.
- Judged 768 candidates in createdAt order, from source at their pinned
  merge base and head, up to the 30th member on 2026-10-05. Every candidate
  is listed in holdout.json with its pins and reason, member or skipped.
- One judge, a Claude Code (Opus 5.5) agent, before any engine output; no
  Agents Shipgate command ran on any candidate. The record says so (`judge`)
  and says how the rule was read where it needed reading (`walk`).
- The rule, the definitions and the pool are unchanged; their digests hold.
  The pinned-holdout test now also checks the stop at the 30th member and
  the judge statement.

* fix(benchmark): scope the holdout judge statement and record move and condition readings (#1158)

The judge statement said no engine output was produced for any candidate.
That is true of the judge, not of the candidates: this repository's own CI
ran `verify` on its 14 ThreeMoonsLab/agents-shipgate candidates. The
statement in holdout.json (`judge`, `walk.method`), the README and the
CHANGELOG now says what the judge did, names the CI run, and says it was
not consulted; the test pins the scoped phrase.

walk.interpretations gains the reading used for moves (an agent moved or
renamed with unchanged bindings is the same agent, roee-hersh/toolpass#64),
and the conditional-member reading now says it covers only bindings named
in source and what the other reading would change (apowerb/apowerb#278
would be member 29, team-ieum/ieum-agent#65 the 30th, usestrix/strix#1446
would drop out).

The test now checks the pins, merge_base != head and the state of every
walked candidate, not only the members, and that the walk's counts add up:
created - development - closed - no non-test .py = candidates = walked.

* Resolve nested scan paths in SARIF (#1212)

* Resolve nested scan paths in SARIF

Refs #1047

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings …
…anges use, and propose the next-reader decision (#916) (#1215)

* docs(benchmark): measure which frameworks agent-changing PRs use, and propose the next-reader decision (#916)

benchmark/framework-mix/ pins 375 public pull requests from the 90 days to
2026-11-17, each judged from source at its merge base and head: 250 from
framework-neutral title searches in randomly drawn hours (the share), and 125
from per-framework code searches (how readable each framework's bindings
are). Holdout-pool repositories and development-corpus pull requests are
excluded before anything is read.

Of the 61 neutral pull requests that change an agent's tools, sub-agents or
handoffs, or an MCP server's tools: 31 use no framework, 18 change an MCP
server, 5 LangChain or LangGraph, 1 PydanticAI, 6 another named framework,
and none the OpenAI Agents SDK or Google ADK.

docs/engineering/next-application-reader.md (status: proposed) recommends no
new framework reader yet, states the criterion in Q0/Q1 terms, addresses the
ROADMAP non-goal, and leaves MCP server registrations to the owner as a scope
question. No reader is implemented.

* test(shard): give the framework-mix benchmark test its measured weight (#916)

* docs(benchmark): state the framework mix's title-frame recall and correct its judgments

The neutral frame samples pull requests titled as agent tool changes. Its
word rule matches 1 of the 49 development-corpus titles and 1 of the 59
relevant pull requests the framework frames found, so its shares are
shares among such titles, not among agent-changing pull requests. The
README, the decision record and the CHANGELOG now say so, with the
recall table counted by summarize.py.

- Judgments corrected after review: two capped dossiers re-read as
  relevant, coding-agent plugins and memory layers reclassified, one
  stacking rule, readability and existing-agent fixes, a local `agents`
  package no longer read as the SDK. Every capped not-relevant
  application pull request was re-read from its full patch; sample.json
  records dossier_capped and reread_full_patch.
- reach is counted over agent-binding pull requests; criterion 1 uses
  addressable with reach at the low end of its interval. No reader now
  rests on Q1 0 of 49 and on the sample's size and frame.
- Pool effect and cluster caveat stated; two titles naming a private
  person recorded as null.
- The test checks the walked hours and candidates are the first of
  their seeded orders.

Refs #916

* fix(application): code that can rebind the agent module's names keeps a tool's row (#1146 follow-up) (#1214)

* fix(application): code that can rebind the agent module's names keeps a tool's row (#1146 follow-up)

* docs(changelog): amend #1146's compatibility sentence and record the rebinding follow-up's corpus result (#1146)

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(application): rebinding reasons survive copy, every unread import counts, and a caller's namespace write keeps the row (#1146 follow-up)

* docs(changelog): the rebinding follow-up counts every unread import and a caller's namespace write (#1146)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_requi…
* docs: lead application review with local comparison (#1170)

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cle…
* docs: define the application diff reviewer pilot (#1171)

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* Compare host inputs from explicit committed heads (#1204)

* feat(diff): compare pinned host commits without a checkout

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(security): refuse a linked reports directory inside the repository; contain captured inputs (#1031)

Review cycle 3 on #1198.

- An output directory typed with --out (scan, verify, the Action's
  --out agents-shipgate-reports) and verify's default reports directory are
  walked from the repository root before they are resolved
  (refuse_links_inside): a link or junction in any component inside the
  repository is refused before inputs load or anything is written.
  Directories above the repository stay the operator's choice. The --out
  write root is the validated directory as typed.
- verification-inputs/ copies go through write_contained.
- The shared symlink walk and directory creation also refuse junctions.
- apply-patches loads each planned target as a manifest before writing and
  refuses a patch that would leave it unloadable.
- Tests pin the printed apply-patches command running from another
  directory, and the mechanical repair's --workspace.
- Docs say ownership of .git is checked on POSIX only.
- test_agent_control_reports_dir: the in-repository link spelling is now
  refused by the writer, so the test asserts the refusal.

* fix(scan): anchor relative output overrides to the manifest

* fix(inputs): read encoded and deep Python source safely (#1184)

* fix(inputs): read encoded and deep Python source safely (#1042)

* fix(inputs): keep BOM tolerance out of baseline evidence

* test(inputs): isolate encoding cases from OpenAPI regressions

* test(ci): measure the encoding test shard weight

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup did before,
  so a removal that fails raises its OSError and clear_verifier_route_artifacts
  still turns it into ArtifactLifecycleError with the same recovery.
- apply-patches --workspace goes through the shared workspace guard
  (require_workspace) before anything is read, like every other
  --workspace command: an absent, non-directory or unreadable workspace is
  a config_error with exit 2. It joins the workspace input sweep.

* fix(inputs): handle non-text codecs and chained Python calls

* docs(inputs): spell out structured input format selection

* fix(inputs): report incomplete Python tool bindings (#1192)

* fix(inputs): report incomplete Python tool bindings (#1038)

* test(ci): measure the Python reader test shard weight

* fix(sdk): keep rebound constructor candidates visible

* fix(inputs): verify Python tool member bindings at their use

* test: expect the tool list mutation call site

* docs: explain ownership of nested manifest placeholders (#1208)

* fix(verify): stop when the explicit head removes the manifest (#1210)

Preserve the human stop when the explicitly evaluated head removes a manifest present at the merge base. A checkout copy cannot produce verification artifacts for the removed gate.

* fix(verify): align preview and trigger comparison inputs (#1188)

Use the shared base resolver and report exclusion for preview and triggers. Preserve actionable missing-ref recovery and the selected no-base mode in preview handoffs.

* fix(verify): show progress before building Git archives (#1206)

* fix(host): align workflow classification and case-folded parsing (#1144)

* fix(host): a policy pack is not a workflow, and CI.YML is parsed as YAML (#1143)

`check`'s workflow predicate (`core/host_boundary.py::_is_workflow_path`)
took any `.yml`/`.yaml` the registry's `shared` adapter enumerates and
tested what followed its first 18 characters for a `/`, without checking
the `.github/workflows/` prefix. The `shared` adapter also enumerates
`policies/*.shipgate.yaml` and the named boundary policies, so every pack
was evaluated as a GitHub workflow:

- a pack with a top-level `permissions: write-all` got
  `HOST-WORKFLOW-WRITE-ALL` and `block` from `check`, and full `verify`
  published it as a release-blocking finding;
- a malformed pack got `HOST-CONFIG-PARSE-FAILED`
  (`workflow_yaml_parse_failed`).

Each displaced the pack's own `BOUNDARY-PROTECTED-SURFACE-UNCLASSIFIED`
row. The predicate also compared the extension case-sensitively, so
`check` never evaluated `.github/workflows/CI.YML`.

The reader's `parse()` chose YAML and TOML by a case-sensitive suffix.
So `CI.YML`, which the registry and the reader classify as a workflow, went
to the JSON parser, and both inventories recorded a blocking
`parse_failed`. `diff` and `verify` came back `incomparable` with no rows,
and `check` answered `require_review` (`BOUNDARY-INPUT-INCOMPLETE`) to a
`write-all` widening that blocks in `ci.yml`. `.codex/CONFIG.TOML` was
refused the same way.

The fix:

- `_is_workflow_path` delegates to `is_github_workflow_path` (#1110), so
  `check` evaluates exactly what the comparison reads as a workflow.
- `parse()` chooses its parser by the case-folded suffix.
- The Codex grant dispatch folds the suffix too, so a parsed `CONFIG.TOML`
  publishes its grants rather than none.

GitHub documents only the `.yml`/`.yaml` extensions in
`.github/workflows`, and says nothing about letter case. So a case variant
stays a workflow, per `glob_match_ci`'s conservative rule.

Closes #1143

* test: re-measure the #1143 test files' shard weights

The `Release.Yaml` route case took the same path as `CI.YML`'s, and its
suffix is already pinned by the parser and agreement cases, so it is
dropped. That leaves:

- tests/test_workflow_directory_instructions.py: 33 cases, 106.4 s
  (was 23 cases, 50.6 s);
- tests/test_declared_policy_pack_boundary.py: 27 cases, 54.6 s
  (was 22 cases, 44.3 s).

Both were measured serially on a loaded machine, where the old cases of
the first file ran about 1.5x their recorded time. The weights overstate
the files, which is the safe direction for the shard that holds them.

* fix(host): parse every workflow name matched by the registry

* fix(verify): hold the verdict on changed unreadable host inputs (#1161)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): consistently report unreadable configuration shapes

* fix(verify): preserve human review for host-only comparisons (#1190)

* fix(verify): preserve human review for host-only comparisons (#1152)

* fix(verify): preserve incomplete host comparison recovery

* fix(setup): install and route host-only advisory verification

* fix(setup): load the workflow through the static wheel layout

* test(verify): pin the incomplete comparison recovery command

* test(setup): check the host-only advisory workflow handoff

* fix(verify): preserve host review across pinned comparisons

* fix(host): preserve workflow setup and review summaries

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004) (#1202)

* fix(verify): a changed host config the reader cannot read holds insufficient_evidence, not review_required (#1154)

A pull request that added Bash(*) to .claude/settings.json was blocked
(strict exit 20). The same change padded past the reader's 1 MiB bound,
with a leading // line, or cut short was review_required (strict exit 0,
control review_publishable): the blocker disappeared and two medium
review rows stood in for it.

- verify records each changed file the boundary assessment could not
  read as a policy evidence gap (unknown_policy_evidence, source_type
  agent_boundary_input), so the one decision engine holds the verdict at
  insufficient_evidence and strict mode exits 20. The verifier control
  for such a run is human_review_required, as check already said. A file
  git reports unchanged on both sides adds no gap. The 1 MiB bound stays.
- Every host-config parse goes through one nesting bound (64 levels,
  core/structured_depth.py): a 5,000-deep file is a typed, file-named
  refusal in diff, check, audit --host and verify instead of a
  RecursionError traceback or internal_error.
- An empty detached check --diff adds the input issue boundary_diff_empty
  (require_review, partial coverage) and keeps its stop; the boundary
  result model refuses decision allow with incomplete input coverage.

* fix(verify): count every unread host file, honour no-newline markers, never allow a detached diff (#1154)

Review round 1 on #1161:

- The diff reader dropped Git's "\ No newline at end of file", so a new
  host config without a final newline was rebuilt with one, mismatched
  the file and read as unresolved: valid new files failed strict CI.
  DiffHunk records the marker per side and every rebuild honours it. A
  *_content_unresolved row no longer counts as unread on its own.
- The assessment records which input-issue files the reader did not
  read: a read or parse failure, a Claude Code settings or hook shape it
  refuses, an enabled plugin's hook file it does not open, an OpenShell
  document it refuses, a binary file. verify's gap counts those, so a
  string where a rule list belongs, a refused OpenShell policy and an
  unparseable base hold the verdict too. The gap names the unread side.
- A JSON host config whose top level, or MCP server map, is not an
  object is a CONFIG-PARSE-FAILED row (parser NotAnObject); a top-level
  array no longer crashes check or makes verify exit 4.
- A detached diff (check --diff, MCP diff_text) never reports allow and
  reports coverage unknown where it read everything it named (issue
  boundary_diff_unbound); its stop and rows are unchanged. The boundary
  result model refuses allow beside a stopping control.
- STABILITY and CHANGELOG state the decision precedence exactly.

* fix(mcp): keep the shipgate.check description within 1024 characters (#1154)

The detached-diff sentence added in the previous commit took the
description to 1029 characters, past the cap test_mcp_server holds every
tools/list description to for model APIs that refuse a longer one. It now
states only that the decision is never allow; the coverage rule is the
result model's.

* fix(host): count a shape refusal as unread only for a Claude settings or hook file (#1154)

Review cycle 2 on #1161:

- The inventory reads a nested .github/workflows/*.yml, and the shared
  adapter's .shipgate/agent-contract.json and .agents-shipgate state
  files, as configuration under the Claude Code host, and refuses a
  permissions value that is not a Claude settings object. Counting that
  refusal as unread made a nested workflow with permissions: read-all
  insufficient_evidence where main said review_required. Only a Claude
  Code settings layer or hook file now records a shape refusal; the
  misfiling itself is left for a follow-up.
- docs/host-boundary-support.md: unreadable boundary policies are counted
  as unread, and an unparseable unified or Codex policy also blocks.
- The agent-protocol repair-after example is regenerated from its
  documented command and its README sentence corrected.
- STABILITY: risk_level stays explanatory under the detached rule.

* fix(host): name an unchanged in-tree directory link as an unchanged limit, not a refusal (#1004)

chanzuckerberg/single-cell-data-portal#7802 changes only `.mcp.json`, and
`diff` refused it: four unchanged Terraform links such as
`.happy/terraform/envs/dev/modules -> ../../modules` are not at a boundary
location, so the reader does not read through them, a `**/` glob could match
beneath them, and each was a blocking `unreadable` limit that
`unchanged_limits` never named. One untouched link hid every row.

By the owner ruling of 2026-11-15, such a link is named as an unchanged
`unreadable` limit, and the rows beside it kept, when Git proves it
unchanged without following it (`cli/verify/git.py::unread_link_unchanged`):
the same mode-120000 entry and blob on both sides, a relative text naming in
one hop an in-tree directory that does not hold the link, the same tree
object for that directory with no link or submodule beneath it, and in a
working tree every entry beneath it read by its own entry and unfiltered
hash. A link where a host reads agent configuration keeps its blocking
limit, so configuration cannot be moved behind a link
(`boundary_registry.is_host_configuration_location`): a configuration
file's name, at, under or above an anchored configuration directory,
inside a `**/` configuration directory or a plugin manifest directory, or
with such a path beneath it by Git's listing. The comparator checks the
link's own path too.

`diff`, `verify`'s host comparison, the PR comment and a `partial`
comparison read one proof. `check` cannot name a limit, so it refuses with
`unchanged_limits_not_representable` as for every unchanged limit. The
inventory, `audit --host`, baselines and drift are unchanged, and an
unchanged link adds no #1154 evidence gap. No schema, contract, limit kind
or check ID moves.

Two tests pinned the old refusal with `docs/proxy -> ../src/pkg`; they now
name a directory holding a link, which still refuses, keeping their intent.

* fix(host): unchanged-link proof skips build output, shares work, and bounds a comparison (#1004)

Review cycle 1 on PR #1202.

- Build output no longer defeats the working-tree proof. A directory or
  link named as one the repository walk never enters (`__pycache__`,
  `node_modules`, `.venv`, `.pytest_cache` and the rest of
  `_WALK_SKIPPED_DIRECTORIES`) is not walked beneath the directory a link
  names, so a local test run no longer turns `diff` incomparable while
  `verify --head` compares. Every host's reader enumerates its sources from
  that walk; a file another reader opens by reference (a hook script, an
  OpenShell policy) is compared at its own path or carries its own limit.
  A file Git tracks beneath such a name still counts, checked by its own
  entries. Any other ignored name, such as `.terraform`, still counts.
- `UnreadLinkProver` examines a directory several links name once, keyed
  by its path and tree object: one listing, one registry match and one
  working-tree check. One comparison examines at most 20,000 files and
  128 MiB beneath its links. Past a bound, a link keeps its limit, and the
  refused comparison's coverage detail says why. The registry match a
  directory shares rests on an invariant now pinned by a test: beneath a
  link that is not itself a configuration location, whether a path is
  configuration depends on its part below the link alone.
- CHANGELOG and STABILITY say a configured `verify --head`, as the Action
  runs it, still refuses any committed link at its whole-commit archive
  (#688), with misleading `Fix the manifest in place` advice, so such a
  repository never reaches this comparison in CI.
- Tests pin the fail-closed branches: the 10,000-file bound, the per-link
  and comparison byte bounds, the comparison file budget, a gitlink beneath
  the directory, and `core.fileMode=false` and `core.autocrlf` checkouts.
- The carve-out wording says `.cursor`, `.vscode` and `.agents` are
  anchored at the repository root; a nested copy is named, as tests pin.

* test(diff): assert diagnostics after decoding terminal colors

* Name unread host changes and compare Action helper commands (#1199)

* fix(host-diff): name unread changes and compare Action helpers

* fix(host-drift): distinguish malformed Action helper evidence

* docs: correct YAML list placeholder paths (#593) (#1173)

* fix(application): a binding that reads the same on both sides is not a candidate change; application comparison 0.5 (#1146) (#1162)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): show specific changes in large candidate findings (#1174)

* fix(application): a binding that reads the same on both sides is not a candidate change (#1146)

* test(application): re-render the Q2 goldens from main's answers with #1146, and record its shard weight

* docs(application): say read_same is new since 1.3.0 (#1146)

* fix(application): a doubt about which definition or setting is bound keeps the row; application comparison 0.5 (#1146)

* test(application): re-render the Q2 goldens with application comparison 0.5, and state what dropped rows no longer carry (#1146)

* fix(application): an unread rebinding import, a guessed handoff target and an unnamed MCP endpoint keep the row (#1146)

* fix(diff): show specific changes in large candidate findings (#1168)

* test(application): re-render the Q2 golden inputs from the final engine's run (#1146)

* fix(diff): rank candidate reach before other changes

* fix(openapi): surface unread schema carrier references (#1175)

* fix(openapi): surface unread schema carrier references (#1166)

* fix(openapi): resolve media carriers and identify unread references

* Count unsupported cold-start settings as changed cases

Refs #1084

* fix(readers): stabilize n8n selection and explain unread MCP files (#1176)

* fix(readers): make n8n selection deterministic and explain unread MCP files (#1073)

* test: classify the unread MCP warning decoder as a non-message

* fix(n8n): prefer canonical node fields and clarify MCP audit guidance

* fix(verify): record effective plugin opt-in in capability locks (#1178)

* fix(verify): record effective plugin opt-in in capability locks (#1062)

* docs: explain where capability lock hashes change

* fix(verify): clear stale scan artifacts before manifest-free previews (#1179)

* fix(verify): clear stale scan artifacts before manifest-free previews (#1067)

* fix(verify): clear stale remediation before host comparison

* fix(org): validate supplied attestation verdicts and capabilities (#1180)

* fix(org): check attestation verdict and capabilities against the verifier (#1066)

* docs(org): place the attestation bundle release note

* fix(org): cross-check attestation claims before publishing

* fix(attest): use report evidence bound by a verified receipt (#1181)

* fix(attest): use report evidence bound by a verified receipt (#1068)

* docs(attest): place the receipt-bound evidence release note

* fix(attest): publish only receipt-bound report evidence

* test(packaging): check built-in entry-point declarations (#1182)

* test(packaging): verify built-in check entry-point parity (#1051)

* docs(packaging): explain built-in registration and wheel contract files

* fix(verify): bind prepared comparison reports to the base ref (#1183)

* fix(verify): bind prepared comparison reports to the base ref (#1076)

* test(verify): check the currency of base comparison reports

* fix(verify): recheck prepared comparison report origins

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031) (#1198)

* fix(security): anchor write containment on trusted roots; one hardened Git environment (#1031)

apply-patches took its containment root from report.manifest_dir, which
arrives in the same untrusted report as the patches. Targets must now also
resolve under the working directory or its git toplevel; anything outside
exits 5 with nothing written. A JSON pointer that does not fit its target
document (a list pointer ending in "-" included) is a malformed patch:
exit 2 with the malformed_patch envelope, no traceback, and every file is
planned before any is written.

output.directory in shipgate.yaml must be a relative path inside the
manifest's directory: the manifest schema rejects absolute, drive, UNC and
".." values (docs/manifest-v0.1.json carries the rule as a pattern), and
scan refuses a directory that resolves outside through a link. scan --out
still writes anywhere.

Every Git child in src/ takes its environment from core/git_env.py's
hardened_git_env(), the union of the five hand-written copies; the hook
runner has it rendered in and the zero-install detector keeps a copy, both
held equal by tests/test_git_env.py. The fixture also disables hooks and
signing.

display_path and the symlink-chain walk each have one implementation in
core/paths.py; the differences callers relied on are named arguments.

* fix(security): contain every scan write and clear; apply-patches edits only the manifest (#1031)

Review round on #1198, including the owner's extension of #1031's
acceptance criteria to linked output leaves and linked parent directories.

- core/contained_write.py: one writer for every file scan writes or
  clears (reports, packet files, scaffolds, current-control.json, verifier
  artifact cleanup). It refuses a link in any directory below the trusted
  root, a link, special file or hard link at the destination, and a
  spelling outside the root, before anything is written or removed; files
  are opened with O_NOFOLLOW where available. The scan checks every
  reports-directory artifact name before its first write.
- apply-patches: a target must load as a Shipgate manifest and is refused
  when it is a protected agent-boundary or trust-root file. New
  --workspace option names the trusted root; verify's printed commands
  carry it. The git toplevel counts only when its .git is a directory or
  gitdir file owned by the user (owned_git_root_for). A directory target is
  a structured error. Refusals print the resolved target.
- output.directory errors say to remove the value or make it relative.
- Fold the remaining display-path copies (codex_config, mcp_manifest,
  discovery artifacts and signals) and the agent_boundary symlink walk.
- Tighten the spawn-site test; state where pointers differ from RFC 6901.

* fix(security): keep the cleanup-failure contract; guard apply-patches --workspace (#1031)

- remove_contained removes through Path.unlink, as the cleanup d…
@pengfei-threemoonslab
pengfei-threemoonslab merged commit 7cc2877 into main Nov 18, 2026
16 checks passed
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.

1 participant