Skip to content

Integration candidate: engine upgrade and evidence hardening - #153

Merged
ecryptoguru merged 49 commits into
mainfrom
codex/prod-readiness-engine
Sep 20, 2026
Merged

ecryptoguru merged 49 commits into
mainfrom
codex/prod-readiness-engine

Conversation

@ecryptoguru

@ecryptoguru ecryptoguru commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Integration of engine PRs #144#152 plus corrective source and evidence hardening. The branch now includes current engine main (#144 and #146); merge commit 11ea4e1a has the same source tree as the reviewed corrective head ef653236.

Changes: safe attachment staging/retry cleanup; redacted and manifest-bound threat evidence; revision-pinned repository acquisition; frozen copied-source byte receipts; no-follow directory traversal; fail-closed asserted DIFF when cleanliness is unknown. The controlled Strix derivative footprint remains unchanged.

Local proof on the final source tree: controlled-derivative gate passed (2,493 tests, 4 skipped; Ruff, mypy over 191 source files, Bandit), dependency audit found no known vulnerabilities, branding check and wheel/sdist build passed. Exact engine/app worker contract passed 347 tests. Fresh CI for 11ea4e1a is required before merge.

Release boundary: this PR does not enable authenticated beta scans or outbound connectors. App pins must be advanced to the final engine main SHA after the approved engine merge. No production deployment or paid scan is authorized by this PR.

Summary by CodeRabbit

  • New Features

    • Source snapshots now preserve and record the exact content used for scans, including changes to untracked files.
    • Full-scope scan records include per-source revision, cleanliness, and snapshot details.
    • Threat-model exports now redact sensitive content and flag truncated documents when size limits are exceeded.
  • Bug Fixes

    • Improved protection against unsafe file substitutions, symlinks, directory changes, and oversized attachments.
    • Scans fail safely when asserted revisions cannot be verified against a clean workspace.
    • Cleanup now removes stranded attachment data.

ecryptoguru and others added 30 commits September 19, 2026 20:55
Import upstream release v1.6.2 (ff5c8cc8) via the no-common-ancestor tree
delta (git diff v1.5.3..v1.6.2 | git apply --3way). All 86 non-merge commits
dispositioned in docs/superpowers/plans/2026-09-19-strix-162-disposition.md.

Substrate: MCP tool layer, cloud/platform CLI modules (unwired at the product
boundary), coverage/evidence pipeline, dedupe provider binding, resumable-agent
lifecycle, curated skills. strix/skills/tooling/{hurl,hypothesis}.md excluded
(sandbox ships neither tool); semantic_confusion.md's dead refs rewritten.
strix/skills/__init__.py now matches upstream exactly (telemetry gate moved out).

Owned ports (lyrashield/**, product-authoritative): config merge-persist with
linked LLM-connection invalidation and active-alias writes; provider-bound
dedupe credentials via resolve_dedupe_model; reasoning=max via top-level
extra_body and the LiteLLM-only prompt-cache gate; resumable/unreachable agent
model with claim_parent_notice and terminal-send refusal; clean_optional
nullish filters; session capability required for all viewer run data including
the launched run; markdown-it-py PDF renderer (new viewer dep); calibration
metadata rendering; _clean_title sanitize + legacy finding_class backfill;
stream_idle_timeout/max_tool_calls_per_turn settings parity; ZAI/GLM frontier
family; SDK default-key reset to None (env fallback stays live).

Gate: verify-controlled-derivative.sh updated to the v1.6.2 base — 14 modified
+ 2 reviewed deletions, +149/-258 footprint, digest 30b8c59d.
…release-candidate

# Conflicts:
#	UPGRADES.md
…se-candidate

# Conflicts:
#	lyrashield/runtime/session_manager.py
…e-candidate

# Conflicts:
#	lyrashield/runtime/session_manager.py
#	scripts/customer-branding-allowlist.json
The Task-12 preflight probe runs inside the session-ownership scope; fake
backends in the cleanup/attachment suites have no container attrs or exec,
so exec=absent correctly fails preflight. Mock the probe seam — these
suites exercise lifecycle and mount semantics, not probing.
…ors' into codex/integration-release-candidate
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 35de10ca-2646-47b9-95ed-385ac8db66d4

📥 Commits

Reviewing files that changed from the base of the PR and between bf89a65 and d88ab35.

📒 Files selected for processing (15)
  • .lyrashield-worker-pin
  • lyrashield/artifacts/evidence.py
  • lyrashield/artifacts/state.py
  • lyrashield/interface/utils.py
  • lyrashield/lifecycle/runner.py
  • lyrashield/runtime/attachments.py
  • lyrashield/runtime/local_dir_staging.py
  • lyrashield/runtime/session_manager.py
  • tests/fixtures/threat_model_writer_1_1.json
  • tests/test_attachments.py
  • tests/test_local_dir_staging.py
  • tests/test_review_changes.py
  • tests/test_run_record_v1_1.py
  • tests/test_session_cleanup.py
  • tests/test_session_entries.py
💤 Files with no reviewable changes (1)
  • lyrashield/artifacts/state.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds frozen local-source staging and provenance recording, strengthens diff-scope and attachment validation, bounds threat-model exports, aligns schema-version constants, updates tests, and advances the worker pin.

Changes

Runtime integrity

Layer / File(s) Summary
Frozen source snapshots
lyrashield/runtime/local_dir_staging.py, lyrashield/runtime/session_manager.py, tests/test_local_dir_staging.py, tests/test_session_entries.py
Local sources use descriptor-based frozen staging and deterministic sha256: tree digests. Session bundles record the resulting source snapshots.
Diff-scope provenance
lyrashield/interface/utils.py, lyrashield/lifecycle/runner.py, tests/test_review_changes.py
Diff-scope metadata now records repository revisions, dirty state, and snapshot stages. Asserted revisions fail when worktree state is dirty or unavailable.
Attachment staging validation
lyrashield/runtime/attachments.py, lyrashield/runtime/session_manager.py, tests/test_attachments.py, tests/test_session_cleanup.py
Attachment staging validates record identity and file state, streams hashing and copying, rejects symlink replacement, and removes owned staging paths during cleanup.
Evidence export contract
lyrashield/artifacts/evidence.py, lyrashield/artifacts/state.py, tests/test_run_record_v1_1.py, tests/fixtures/threat_model_writer_1_1.json, .lyrashield-worker-pin
Threat-model exports redact and bound model-controlled values. The run-record schema constant uses the evidence definition, the fixture covers the export shape, and the worker reference changes to a new pinned revision.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SessionManager
  participant FrozenStaging
  participant Digest
  participant Runner
  participant RunJson
  SessionManager->>FrozenStaging: copy local source tree
  FrozenStaging->>Digest: hash staged tree
  Digest-->>SessionManager: return source digest
  SessionManager->>Runner: provide source_snapshots
  Runner->>RunJson: record source and repository provenance
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 58 functions across 12 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: engine integration and evidence hardening.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 41.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 58 functions across 12 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ecryptoguru
ecryptoguru marked this pull request as ready for review September 20, 2026 01:17
@ecryptoguru
ecryptoguru merged commit 81cd6f7 into main Sep 20, 2026
4 checks passed
@ecryptoguru
ecryptoguru deleted the codex/prod-readiness-engine branch September 20, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants