Skip to content

release: final v2.2.2 hardening - #103

Merged
noctem-o merged 1 commit into
mainfrom
codex/prepare-release-pr-for-cogitator-v2.2.2
May 16, 2026
Merged

noctem-o merged 1 commit into
mainfrom
codex/prepare-release-pr-for-cogitator-v2.2.2

Conversation

@noctem-o

Copy link
Copy Markdown
Owner

Motivation

  • Preserve provenance and correctness: ensure replay mode preserves the original transcript policy_digest so replayed runs cannot lose the policy identity committed in the baseline record.
  • Security/harness correctness: ensure live ordeal runs that record precomputed fixture responses still evaluate and honour policy before committing executed vs phantom entries.
  • Transparency: update README wording to disclose that --nix-provenance=auto|on may run bounded local Nix commands for diagnostic provenance while keeping provenance-only / witness-root invariants.
  • Release prep: bump package version for a patch release to 2.2.2 and add a short changelog entry.

Description

  • Implemented replay digest preservation by adding replay_policy_digest: Option<String> to ToolTranscript, setting it in new_replay(...), leaving it None in new_live(...), and returning the preserved digest from into_record() when present; this preserves policy_digest during replay. (changed: src/tooling.rs)
  • Added a policy-aware precomputed-response execution path ToolTranscript::execute_with_precomputed_response(...) which normalizes tool names, allocates tool_call_idx exactly once, evaluates the current PolicyEngine before recording, records PhantomEntry on Block/Phantom, and records actual ToolCall only on Allow; switched run_ordeal live path to use this method. (changed: src/tooling.rs, src/ordeal.rs)
  • Tests added to cover the fixes: replay_preserves_policy_digest (replay digest preservation) and two ordeal tests verifying live precomputed responses under allow and block policies. (changed: tests/replay_phantom.rs, tests/ordeal.rs)
  • README tweak: clarify that --nix-provenance=auto|on may run bounded local Nix commands for diagnostic provenance (closed stdin, timeout-bounded, output-capped) and does not alter witness root computation. (changed: README.md)
  • Version bump and changelog: Cargo.toml package version set to 2.2.2, root [[package]] entry in Cargo.lock set to 2.2.2, and concise CHANGELOG.md entry added for 2.2.2. Dependency versions were not changed. (changed: Cargo.toml, Cargo.lock, CHANGELOG.md)

Testing

  • Formatting/linters: cargo fmt --check succeeded and cargo clippy --locked --all-targets -- -D warnings succeeded.
  • Unit/integration test suite: cargo test --locked succeeded (all tests passed, including the new tests replay_preserves_policy_digest, ordeal_live_precomputed_allow_records_executed_calls, and ordeal_live_precomputed_block_records_phantom_not_entry).
  • Ordeal golden check: cargo run --locked -- ordeal check --golden goldens/ordeal_witness_root.txt succeeded and matched the golden.
  • Demo/drift workflow: cargo run --locked -- demo drift --seed 1 --threads 1 --fault-profile ci --out-dir demo_out --clean succeeded and produced run outputs.
  • Verify workflows: cargo run --locked -- verify --witness demo_out/drift/baseline_faults failed in this ephemeral environment with failed to read witness file (os error 2) due to CLI invocation expectations for the local demo output layout, while cargo run --locked -- verify --witness demo_out/drift/baseline_faults --recompute-witness-root succeeded and confirmed matched=true on recompute.
  • Action pins: bash scripts/check_action_pins.sh succeeded (all actions pinned).
  • cargo dist validation: cargo dist is not installed in this environment (no such command), so cargo dist build was not run here and dist validation is deferred to the release/tag environment.

Notes and non-goals (explicit)

  • No changes to witness-root algorithm, witness domain separators, schema constants, canonicalization semantics, or verifier acceptance semantics were made.
  • No release tag/publish was performed in this PR; maintainers should create the annotated tag after CI passes.

Manual maintainer release instructions after merge

  1. Wait for main CI to pass.
  2. Create tag: git tag -a v2.2.2 -m "Cogitator v2.2.2".
  3. Push tag: git push origin v2.2.2.
  4. Watch the GitHub Actions Release workflow and confirm artifacts/installers and provenance attestation.

If any reviewer hits issues around witness roots or policy digests, treat them as P0 blockers (do not merge until resolved).


Codex Task

@noctem-o
noctem-o merged commit 7a972c2 into main May 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant