Skip to content

Fix completion workspace admission and native review retention - #918

Merged
SUaDtL merged 6 commits into
mainfrom
codex/fix-completion-workspace-capacity
Oct 10, 2026
Merged

SUaDtL merged 6 commits into
mainfrom
codex/fix-completion-workspace-capacity

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Completion review could reject a valid asset-rich workspace, reject evidence written by its own verification step, or lose a valid native first-stop result when request state exceeded its limit. This PR completes all three repairs and integrates current main, preserving the newer UTF-8 observation digest and state-engine performance fixes.

  • Give the complete workspace an independent 1 GiB bound while retaining the 256 MiB selected-input budget, member/entry bounds, full-content hashing and freshness checks.
  • Bind fresh verification to the engine's normalized completion closure through declared-command/0.3.0. Raw before/after execution checks and historical profile semantics remain intact.
  • Store native V1 completion context through a validated immutable reference and reserve result capacity before launch. The 8 MiB context, 1 MiB request-state and 64 KiB decision limits remain unchanged.

Grouped patch versions: ca 2.25.4, ca-codex 0.16.4, ca-pi 0.17.5. Published changelog history is preserved. Pi's currently unsupported verification/review authority remains unsupported.

Fresh Windows verification on the integrated source:

  • Go evidence, observation and operations packages, plus go vet: PASS.
  • Native review/transport: 53 tests PASS. Real-engine completion, native receipt and non-ASCII publication checks: 3 PASS. Verification adapter: 83 tests OK, with one existing POSIX-only skip on Windows.
  • Atlas source revalidation: 51 focused tests, atlas generation, TypeScript checks and authored-page voice audit PASS. All eight provenance wiring checks PASS.
  • Native Go statement union from the current-head CI artifacts: 82.82% (6,662/8,044 statements), all six required platforms and executable integration profiles present; the canonical 70% gate passes. Lines and branches are not measured by this profile.
  • Three focused mutations detected by unchanged tests: normalized-closure mismatch, prelaunch result reserve, and context byte integrity.
  • Security, auth/crypto, dependency and scoped coverage reviews: no findings. Generated parity, package metadata, release eligibility, scoped provenance, syntax and gitleaks checks: PASS.

The exact-head hosted merge gate and package cohort must pass before merge. These local results do not claim a fresh installed-host or production-project exercise.

Current head: f66d9e0e5435cec27fee9f8ac069438ee0a00fa2. Verified base: 8c2b4b51e04193eaf2b7fecb31c50df91fd80f10. Use a merge commit to preserve the atlas review source 0192dc314817ffab18219d6485c11ac1531bbc5c in main ancestry for future clean checkouts. The installed ADR verifier permits this ancestry; revalidate exact base/head before merging.

Closes #917
Closes #919
Closes #921

Asset-rich worktrees can pass native verification and then fail completion
review because full tracked evidence was charged to the selected-input cap.
Keep complete fingerprints and integrity checks while giving workspace
inspection its own bounded 1 GiB capacity.

CHANGELOG: Completion reviews admit larger preserved evidence workspaces.
Closes #917
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 58c87377-ee4c-4e31-8bff-756b153aac88



📥 Commits

Reviewing files that changed from the base of the PR and between 0192dc3 and f66d9e0.




📒 Files selected for processing (4)
  • .codearbiter/.provenance/code-map.json
  • site/WORKFLOW-ATLAS.md
  • site/scripts/execution-maps/atlas-revalidation.test.ts
  • site/scripts/execution-maps/atlas.ts



🚧 Files skipped from review as they are similar to previous changes (1)
  • .codearbiter/.provenance/code-map.json



Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

Completion review can reject workspaces above 256 MiB, treat its own published evidence as source drift, or exceed request-state limits after a valid result. The changes add a separate 1 GiB workspace limit, bind normalized completion closures, and retain native Codex review context by immutable reference with reserved result capacity.

Changes

Completion review

Layer / File(s) Summary
Workspace limit and regression coverage
core/artifacts/internal/evidence/completion_workspace.go, core/artifacts/internal/evidence/completion_workspace_test.go
Workspace collection now allows up to 1 GiB total, separately from the 256 MiB selected-input budget. Tests cover a 270 MiB workspace, fingerprint and freshness behavior, and member and total-capacity limits.
Normalized verification closure
core/artifacts/internal/observation/*, core/artifacts/internal/operations/*, core/artifacts/internal/evidence/completion.go, core/pysrc/_artifactauthoritylib.py, .github/scripts/test_artifact_authority_adapter.py, core/surface/includes/artifacts.md
The declared-command/0.3.0 profile records an engine-produced normalized completion closure. Verification and completion compare the closure while retaining raw workspace checks and historical profile handling. Tests cover publication, changed sources, invalid outputs, and tampered closure data.
Native review context and result capacity
core/pysrc/_artifactauthoritylib.py, .github/scripts/test_artifact_authority_adapter.py, core/surface/includes/artifacts.md
Native Codex completion requests store frozen context by reference. The adapter validates the reference and reserves capacity for bounded results and lifecycle data. Completion prompts specify required decision fields and task obligations; tests cover state and context limits.
Release and revalidation metadata
CHANGELOG.md, plugins/ca-codex/CHANGELOG.md, plugins/ca-pi/CHANGELOG.md, core/surface/includes/artifacts.md, .codearbiter/.provenance/*, .codearbiter/code-map.md, README.md, package.json, core/pysrc/hostapi.py, plugins/ca-codex/*, plugins/ca-pi/*, plugins/ca/.claude-plugin/plugin.json, site/WORKFLOW-ATLAS.md, site/scripts/execution-maps/*
Release notes and artifact documentation describe the workspace, verification, and completion-review changes. Product versions, the README badge, code-map versions, provenance hashes, and atlas revalidation records are updated.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant Adapter as Native adapter
  participant Engine as Evidence context
  participant Observation as Verification observation
  participant Completion as BuildCompletion
  Adapter->>Engine: Request normalized closure for bound commands
  Engine->>Adapter: Return completion_workspace_after
  Adapter->>Observation: Publish verification with normalized closure
  Completion->>Observation: Read completion-profile verification
  Completion->>Engine: Recompute and compare normalized closure
Loading




Merge Risk: ⚪ Minimal · up to f66d9

No confirmed defect remains in the reviewed changes. Preserve the pinned review commit if the change is squash-merged, or the atlas test may fail in a clean checkout.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 66028

The reviewed changes retain checks against source drift, altered evidence, and unauthorized completion. They change security-sensitive admission behavior, but no introduced bypass was identified. Coverage is limited to the changed flows rather than a complete security audit.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected attack surface is repository-local workspace content, generated evidence, and native review request state. Manipulation of those inputs could target completion-proof acceptance or lifecycle integrity; the reviewed changes do not establish a new remote or cross-tenant exposure.

Trust Boundaries and Controls

  • observed — Restoring referenced context requires the expected storage marker, hash-derived locator, bounded canonical content, digest, subject, activity, and native profile. Publication rereads the frozen context and preserves its reference identity before capture.
  • observed — The result-capacity reserve changes storage admission, not approval or reviewer tool authority. Native review conduct remains cooperatively read-only without an OS sandbox; that host isolation limitation predates this PR rather than being introduced by reference storage.

Resilience and Maintainability Implications

  • observed — Workspace collection uses two passes and rejects differing results, preserving ordinary concurrent-change detection. It explicitly does not guarantee detection of hostile change-and-restore sequences; this is an existing boundary of the freshness mechanism.
  • observed — Native lifecycle events use single-use claims and reject repeated or out-of-order transitions. Stale concurrent saves fail instead of overwriting newer request state, while publication retries retain content-addressed capture identity.











Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 16 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed [#917] MaxCompletionWorkspaceTotal adds a separate 1 GiB workspace bound. The 256 MiB selected-input limit, 32 MiB member limit, entry limit, fingerprints, freshness checks, mutation rejection, and …
Out of Scope Changes check Passed The implementation and tests address the three directly linked defects. Version, changelog, README, provenance, code-map, package metadata, and Atlas review updates document and qualify these repairs.…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the primary changes: increasing completion workspace admission capacity and retaining native review context.

Full details: Docstring Coverage

Explanation

Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 16 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





  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Keep each runtime adapter identity equal to its already-bumped manifest so
qualified installations pass the existing matching-only root validation.
Regenerate the three shared hostapi copies without changing validation rules.

Changelog: CHANGELOG.md
Publishing verification evidence changes the raw worktree in repositories where
native artifact history is visible to Git. Bind the engine-normalized closure
in a distinct current producer profile while preserving raw execution checks,
validated-output integrity, and all historical receipt contracts.

CHANGELOG: Fresh verification can reach completion review without rejecting its own evidence publication.
Closes #919
@SUaDtL SUaDtL changed the title Fix completion review capacity for preserved asset evidence Fix completion admission for large workspaces and evidence publication Oct 5, 2026
Keep frozen native completion contexts in their validated content-addressed
files so an admitted first-stop result cannot overflow duplicated mutable
state. Reserve bounded result growth before launching the reviewer and make
the prompt enumerate the already-required completion fields and obligations.

CHANGELOG: Prevent false rejection of valid native completion reviews.
Closes #921
@SUaDtL SUaDtL changed the title Fix completion admission for large workspaces and evidence publication Fix completion workspace admission and native review retention Oct 5, 2026
Carry the three completion workflow repairs onto current main while preserving
UTF-8 observation digests, concurrent readers and published release history.
Group the completed repairs in one patch per affected governance adapter.

CHANGELOG: Retain asset-rich completion workspaces, published verification
evidence freshness and bounded native review results.
The completion fixes change two mapped atlas owners and the grouped patch
versions. Record the reviewed source delta and matching manifest provenance
so CI can verify current claims while retaining historical comparisons.
@SUaDtL
SUaDtL merged commit ee70aa8 into main Oct 10, 2026
81 checks passed
@SUaDtL
SUaDtL deleted the codex/fix-completion-workspace-capacity branch October 10, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant