From 908c74b808bbad5842be3308a1955a8182ee230d Mon Sep 17 00:00:00 2001 From: xeonvs <11463419+xeonvs@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:15:57 +0200 Subject: [PATCH] Release v0.8.0 --- .next-version | 2 +- .release-metadata.json | 12 +- .release-source-date-epoch | 2 +- .release-version | 2 +- CHANGELOG.md | 84 ++++++ PLANS.md | 263 +---------------- ROADMAP.md | 6 +- changelog.d/120.bugfix.md | 5 - changelog.d/120.feature.md | 7 - changelog.d/120.maintenance.md | 1 - changelog.d/120.security.md | 1 - changelog.d/123.doc.md | 1 - changelog.d/124.doc.md | 6 - changelog.d/124.maintenance.md | 6 - changelog.d/125.feature.md | 4 - changelog.d/126.maintenance.md | 16 - changelog.d/127.maintenance.md | 7 - docs/configuration.md | 2 +- docs/engineering/execution_history/README.md | 1 + .../engineering/execution_history/releases.md | 276 ++++++++++++++++++ docs/engineering/toolkit_strategy.md | 2 +- examples/gitlab/ocr-review.gitlab-ci.yml | 2 +- tests/test_environment_contract.py | 6 +- tests/test_integration_contracts.py | 7 +- tests/test_release_notes.py | 47 ++- 25 files changed, 407 insertions(+), 361 deletions(-) delete mode 100644 changelog.d/120.bugfix.md delete mode 100644 changelog.d/120.feature.md delete mode 100644 changelog.d/120.maintenance.md delete mode 100644 changelog.d/120.security.md delete mode 100644 changelog.d/123.doc.md delete mode 100644 changelog.d/124.doc.md delete mode 100644 changelog.d/124.maintenance.md delete mode 100644 changelog.d/125.feature.md delete mode 100644 changelog.d/126.maintenance.md delete mode 100644 changelog.d/127.maintenance.md diff --git a/.next-version b/.next-version index 7486fdb..6f4eebd 100644 --- a/.next-version +++ b/.next-version @@ -1 +1 @@ -0.7.2 +0.8.1 diff --git a/.release-metadata.json b/.release-metadata.json index 435e1ca..1996653 100644 --- a/.release-metadata.json +++ b/.release-metadata.json @@ -1,10 +1,12 @@ { "issues": [ - 115, - 116, - 117, - 118 + 120, + 123, + 124, + 125, + 126, + 127 ], "schema_version": "ocr-toolkit.release-authorization/v1", - "version": "0.7.1" + "version": "0.8.0" } diff --git a/.release-source-date-epoch b/.release-source-date-epoch index f0997b3..c241962 100644 --- a/.release-source-date-epoch +++ b/.release-source-date-epoch @@ -1 +1 @@ -1787321366 +1787572363 diff --git a/.release-version b/.release-version index 39e898a..a3df0a6 100644 --- a/.release-version +++ b/.release-version @@ -1 +1 @@ -0.7.1 +0.8.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index a03a2c2..0d61d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,87 @@ +## 0.8.0 - 2026-08-24 + +### 🚀 Features + +- Extends bounded review context while preserving existing policy documents: + + - **Added:** `ocr.review-context-policy/v2` accepts optional `remediation_threads`; `context_list`/`context_get` expose admitted records as opaque `remediation_thread` resources from the ephemeral `ocr.context-store/v2`. + - **Added:** the checksum-pinned GitLab example exposes `OCR_MAX_TOOLS` with default `30`, matching OCR 1.9.10, and passes it explicitly to each review so integrations can raise the per-file tool-round bound deliberately. + - **Changed:** rollout guidance separates optional `/models` metadata validation from `ocr llm test` connectivity and from a completed review, and warns that an allowed-to-fail OCR job can leave a pipeline green without usable review evidence. + - **Changed:** a remediation root now requires the authenticated live bot ID plus a valid toolkit marker/fingerprint, is excluded from generic discussion and reference projections, and always makes the review comment-only. DLP-clean metadata, generic discussions, and adapter records do not independently block automatic approval; DLP rejection and required-source degradation remain blocking. + - **Migration:** existing `ocr.review-context-policy/v1` documents remain accepted for generic discussions and references. Use policy v2 only when selecting `remediation_threads`; ephemeral stores are rebuilt per run and have no migration step. + + ([#120](https://github.com/xeonvs/open-code-review-toolkit/issues/120)) +- Adds live-username lifecycle commands without changing slash-command semantics: + + - **Added:** reviewer lifecycle commands accept exact whole replies `@ suppress` and `@ resolve`, using the username returned by authenticated GitLab `GET /user`. + - **Changed:** existing `/ocr suppress` and `/ocr resolve` behavior is unchanged; typo, prose, code-block, wrong-user, bot/system, `retest`, and non-toolkit-discussion replies remain non-commands, and the newest recognized human command wins. + + ([#125](https://github.com/xeonvs/open-code-review-toolkit/issues/125)) + +### 🐛 Bug Fixes + +- Malformed context policies, provider projections, and persisted remediation counts now fail closed at their owned contract boundaries; exclusive GitLab discussion/remediation limits and omitted reply counts now reflect only the applicable records. Operator adapters cannot request the internal remediation resource class, publishable discussion/reference text gets publication-specific DLP, and per-record text limits remain budget omissions rather than invalid-content failures. + Toolkit-generated OCR background is now qualified by the installed, preflight-supported OCR executable under `review --preview` before model execution, with the exact production refs, rules, and selection inputs. OCR remains the sole owner of its current thresholds: a recognized soft warning enters the CI log and finalized result summary, while a recognized hard character/file-size rejection produces only an identity-bound closed numeric failure summary. Unknown preview failures remain generic and fail closed; detailed evidence stays available through the built-in MCP, and explicit truncation preserves the mandatory evidence-call instruction. + Ordinary reviews now remove toolkit-generated evidence, bootstrap, protected rules, context, action receipts, and local DLP diagnostics after both OCR success and failure; only the closed static pre-execution status remains available for the posting handoff when OCR rejects input before model execution. + If OCR rejects a generated background and preview cleanup also fails, the closed OCR rejection now remains available to the static posting handoff; a cleanup-only failure still blocks model execution and publication. Provider compatibility entry points also convert impossible missing projections into explicit closed errors instead of relying on runtime assertions. + Repeated `scripts/quality.sh coverage|check` invocations now replace their own log before running, so a current result cannot include stale output from an earlier interrupted or failed invocation. ([#120](https://github.com/xeonvs/open-code-review-toolkit/issues/120)) + +### 🛠 Maintenance + +- **Changed:** Actions storage maintenance now shards its bounded completed-run lookup by UTC day, retaining the ten-page fail-closed limit per shard. It removes completed TestPyPI preview runs after 14 days, TestPyPI development and ordinary runs after 30 days, and stable `Release` runs after 60 days; active and newer runs remain untouched. A run is no longer removed before the longer log-retention promise for its workflow. No operator migration is required. ([#120](https://github.com/xeonvs/open-code-review-toolkit/issues/120)) +- Removes obsolete environment and example-only configuration surface: + + - **Removed:** `OCR_GITLAB_BOT_USER_ID`; bot ID and username now come only from authenticated GitLab `GET /user`, with no replacement variable. + - **Removed:** compatibility alias `OCR_USE_ANTHROPIC`; set `OCR_LLM_PROTOCOL=anthropic`. Any presence of the removed alias now fails configuration instead of silently falling back to the default `openai` protocol. + - **Removed:** example-only `OCR_RUN_HELPER_TESTS`; run repository tests in the normal lint/test job, not the production review job. + - **Removed:** documentation-only `OCR_LLM_SUPPORTS_FUNCTION_CALLING`, `OCR_LLM_SUPPORTS_REASONING`, and `OCR_CONFIG_PATH`; these had no supported runtime semantics and have no replacement. + + ([#124](https://github.com/xeonvs/open-code-review-toolkit/issues/124)) +- **OCR 1.9.9 — inherited** + + Toolkit 0.7.1 already qualified OCR 1.9.9. Its background-ownership and bounded main-loop diagnostic contracts remain inherited evidence; toolkit 0.8.0 does not require installing or requalifying this predecessor. + + **OCR 1.9.10 — changed** + + - **Changed:** toolkit preflight and `examples/gitlab/ocr-review.gitlab-ci.yml` now accept/pin only OCR 1.9.10 instead of 1.9.9. The Linux amd64 binary is pinned to SHA-256 `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. + - **Changed:** OCR terminal retry diagnostics are grouped by review stage. Structured `ocr.llm-retry-report/v1`, the review result, and `ocr.run-manifest/v1` remain unchanged; `ocr scan` background-wait/resume fixes and the VS Code merge-file change do not affect the toolkit's `ocr review` path. + + **Telemetry** + + The retry report remains private OCR diagnostics. Toolkit 0.8.0 does not ingest it as telemetry or use it for DLP admission, receipts, finding severity, review outcome, or automatic approval. + + **Deployment/Migration** + + Install OCR 1.9.10 directly for toolkit 0.8.0 and update the verified binary checksum. Do not install OCR 1.9.9 as an intermediate step. Any other OCR version fails toolkit preflight. + + ([#126](https://github.com/xeonvs/open-code-review-toolkit/issues/126)) +- **Coverage and boundary gates** + + - **Changed:** the combined branch-aware coverage floor increases from 70% to 85%. + - **Added:** CI and `scripts/quality.sh coverage`/`check` enforce four risk-group floors after the same test run: result/preflight and GitLab posting transactions at 80%; review/context/DLP/approval and MCP/provider/policy/result contracts at 85%. + - **Added:** fault tests cover bounded result and HTTP parsing, atomic replacement, GitLab read/write retry separation, exact publication and rollback identities, context admission/DLP/approval independence, and provider-neutral discussion contracts. + + No new coverage configuration format or standalone parser is introduced. Deployment agents should run the existing quality wrapper; a group failure identifies the trust boundary that needs regression coverage rather than permitting the combined percentage to mask it. + + ([#127](https://github.com/xeonvs/open-code-review-toolkit/issues/127)) + +### 📖 Documentation + +- **Added:** navigation-only indexes at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md` route users and maintainers to existing canonical contracts without changing their ownership. ([#123](https://github.com/xeonvs/open-code-review-toolkit/issues/123)) +- Reworks the GitLab operator documentation for direct deployment: + + - **Added:** `examples/gitlab/README.md` selects identity-only, metadata, enriched-discussion, enriched-adapter, or direct-MCP operation and documents automatic-approval posture. + - **Added:** the environment reference lists every supported variable with owner, requirement, exact default, and behavior; the discussion-policy guide explains when to select generic discussions, verified remediation history, both, or adapters. + - **Added:** `examples/gitlab/accepted-decisions.md` and the later-merge-request `ocr_toolkit_evidence` `list`/`get` walkthrough show both creation and use of accepted decisions. + - **Migration:** context recipes moved from `examples/context/` to `examples/gitlab/context/` and split into `policy-discussions.json` and `policy-adapters.json`; the runtime protected-target path remains `.opencodereview/review-context-policy.json`. + + ([#124](https://github.com/xeonvs/open-code-review-toolkit/issues/124)) + +### Security + +- `ocr-ci review --preserve-private-artifacts` can retain owner-only OCR session/context state for local diagnosis without creating a posting receipt. It also writes a bounded, value-free `ocr.private-dlp-decisions/v1` sidecar with JSON path, detector subtype, size units, SHA-256, and explicit truncation counts so operators can diagnose conservative false-positive classes locally. Ordinary and validated GitLab merge-request execution never retain this attribution; the latter rejects the flag before OCR starts and keeps deterministic cleanup mandatory. ([#120](https://github.com/xeonvs/open-code-review-toolkit/issues/120)) + + ## 0.7.1 - 2026-08-21 ### 🚀 Features diff --git a/PLANS.md b/PLANS.md index 8ca4f77..ca171a2 100644 --- a/PLANS.md +++ b/PLANS.md @@ -4,265 +4,4 @@ Use this file for active or blocked repository work. Update it before implementa ## Active Work -### Release 0.8.0: remediation threads, GitLab commands, and documentation - -- Status: `active` -- Release classification: `release-required` -- Target stable version: `0.8.0` -- Stable delivery state: `qualification-waived-release-readiness-active` - -#### Goal - -Deliver a backward-compatible, privacy-bounded remediation-thread context source, exact GitLab mention commands, a complete environment contract, mode-oriented GitLab examples, Accepted project decisions usage guidance, and navigation indexes. Integrate OCR 1.9.10 as the exact toolkit 0.8.0 target, raise meaningful boundary coverage, and take the exact final head through protected release delivery after the owner explicitly waived the remaining enriched-context qualification without treating that missing receipt as completed evidence. - -#### Plan Origin - -`plan_mode_approved` - -#### Requested Scope - -- Extend the protected review-context policy with optional `remediation_threads` under schema `ocr.review-context-policy/v2`; retain v1 behavior for existing enriched configurations. -- Acquire one verified toolkit-owned finding root and its admissible replies as one opaque remediation-thread record from a stable, twice-read GitLab snapshot. -- Expose remediation threads only through the local read-only context store/MCP projection, with DLP, budgets, closed state/counts, and run-local identities. -- Keep every review with admitted remediation text comment-only. Remediation prose may focus fresh inspection but cannot change severity, prove a fix, suppress a finding, resolve a thread, issue a lifecycle command, or enable approval. -- Obtain the active GitLab bot ID and username only from authenticated `GET /user` and support exact `@ suppress|resolve` replies alongside existing `/ocr` commands. -- Remove obsolete or unsupported environment semantics and publish an exact, categorized environment-variable contract including defaults. -- Reorganize GitLab examples around supported operating modes, move context recipes beneath them, and demonstrate both creation and later consumption of Accepted project decisions. -- Remove obsolete GitLab migration prose, add three navigation-only documentation indexes, and reconcile README, strategy, roadmap, and release notes. -- Create three v0.8.0 sub-issues beneath GitHub issue #120 and keep #120, its sub-issues, milestone, and Draft PR open until stable external reconciliation. -- Repair Actions storage maintenance after live run 32624698380 proved that more than ten aggregate pages of recent completed runs exceed the collector bound. Preserve a ten-page fail-closed limit per UTC day, delete completed TestPyPI preview runs after 14 days, TestPyPI development and ordinary workflow runs after 30 days, and stable Release runs after 60 days, then reconcile the current backlog without touching active or fresh runs. -- Integrate upstream OCR 1.9.10 as the only preflight-supported and example-pinned OCR version for toolkit 0.8.0 after direct source, checksum, and hosted compatibility review. Preserve OCR 1.9.9 only as the separately documented inherited predecessor already qualified for toolkit 0.7.1. -- Add risk-weighted fault tests at the existing result, preflight, GitLab transaction, context, DLP, receipt, MCP, and approval owners; fix production behavior only when a test exposes a real contract violation. -- Raise the existing combined branch-aware coverage floor from 70% to 85% and add four ordinary Coverage.py risk-group reports without a new coverage framework, configuration format, parser, or coverage-only production refactor. -- Finish each corrective cycle with a locally self-reviewed signed head and exact-head hosted CI. Retain the completed direct OCR 1.9.10 review as private remediation input; do not run the separately planned enriched-context qualification after the owner's explicit waiver, and do not represent its missing receipt as accepted evidence. - -#### Requirement Traceability - -- `REQ-001` (`done`): materialized this full plan first, created the feature branch from synchronized `main`, made a signed planning commit, performed the one initial push, and opened Draft PR #122 before implementation. Covered by `WQ-01` and `WQ-02`. -- `REQ-002` (`done`): created v0.8.0 sub-issues #124, #125, and #123, attached them to #120, and appended/read back the coordination checklist without changing #120's core contract. Covered by `WQ-02`. -- `REQ-003` (`done`): implemented policy v1/v2 compatibility, a non-configurable remediation policy type, private store v2, and a fixed model-only safe remediation projection with a new closed MCP resource class. Covered by `WQ-03`. -- `REQ-004` (`done`): added a shared validated live `GET /user` identity owner and derive mutually exclusive generic discussions plus verified remediation bundles from one twice-read bounded snapshot; identity, edit, delete, reorder, and pagination drift fail closed as `mutated`. Covered by `WQ-04`. -- `REQ-005` (`done`): apply budgets and DLP before atomic storage, add MCP/bootstrap/receipt/cleanup integration, and preserve posting suppression, fingerprints, human ownership, resolve rollback, and receipt v5. Covered by `WQ-05`. -- `REQ-006` (`done`): apply DLP to every untrusted MR-derived text path, including title, description, generic discussions, remediation roots/replies, and adapter/reference content, before private-store or bootstrap admission. Keep each source's DLP admission/degradation isolated from receipt-based approval: safe non-remediation context must not block approval, DLP rejection cannot enable approval, and admitted remediation always forces comment-only. Covered by `WQ-05` and `WQ-06`. -- `REQ-007` (`done`): support exact whole-reply mention commands for the live bot username with slash-command parity and closed negative cases. Covered by `WQ-06`. -- `REQ-008` (`done`): removed `OCR_GITLAB_BOT_USER_ID`; reject `OCR_USE_ANTHROPIC` with migration guidance; removed example `OCR_RUN_HELPER_TESTS` and unsupported documentation-only variables while retaining active controls and redaction sentinels. Covered by `WQ-07`. -- `REQ-009` (`done`): published a complete environment-variable/default contract separated by runtime, GitLab predefined, example-local, and dynamic adapter inputs, protected by one exact-set/default contract test owner. Covered by `WQ-07`. -- `REQ-010` (`done`): reorganized GitLab examples by mode, relocated context recipes, removed user-facing `synthetic` labels, and demonstrated Accepted project decisions creation plus later evidence list/get use. Covered by `WQ-08`. -- `REQ-011` (`done`): removed 0.6.x migrations from `docs/gitlab.md`, documented current v1/v2 compatibility and discussion-policy selection in `docs/review-context.md`, and explained that retest requires GitLab retry UI/API or an external Note Hook receiver. Covered by `WQ-08`. -- `REQ-012` (`done`): added navigation-only managed indexes at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md`; reconciled links, README, strategy, roadmap, and Towncrier fragments. Covered by `WQ-09`. -- `REQ-013` (`done`): completed focused, adversarial, artifact, quality, secret, manifest, release-draft, reproducibility, and clean-install validation without a separate Codex Security scan or any real local LLM call. Covered by every work item and `WQ-10`. -- `REQ-014` (`done`): left implementation in Draft PR #122 through corrective review and exact-head hosted validation; the owner explicitly waived the remaining enriched-context receipt on `2026-08-24`, so lifecycle progression is no longer deferred on that evidence. Merge, publication, and closure still follow their independent protected gates. Covered by `WQ-18` and `WQ-11`. -- `REQ-015` (`done`): made the v0.8.0 release-note delta equally actionable for a production-integration agent and a human operator: categorized each outcome by effect, explicitly labelled additions, changes, removals, defaults, and migrations, and named exact public symbols and replacements. Removed environment variables have a separate `maintenance` fragment. Covered by `WQ-07` and `WQ-09`. -- `REQ-016` (`done`): made scheduled Actions maintenance tolerate more than ten aggregate recent-run pages without weakening bounded pagination, introduced conservative completed-run retention, executed one verified backlog reconciliation, and requalified hosted CI at `373fc2d`. Covered by `WQ-12`. -- `REQ-017` (`done`): integrated OCR 1.9.10 as the exact 0.8.0 target using official source, checksum, hosted compatibility, manifest/evidence, preflight, example, documentation, privacy regressions, and a maintenance-class compatibility update; kept OCR 1.9.9 separately described as the inherited 0.7.1 predecessor. Covered by `WQ-13` and `WQ-14`. -- `REQ-018` (`done`): added meaningful boundary and fault coverage for private results, preflight, GitLab reads/writes/rollback, context admission, DLP, receipts, MCP, provider neutrality, and approval without reorganizing tests or refactoring production solely for coverage. Covered by `WQ-15` and `WQ-16`. -- `REQ-019` (`done`): enforced 85% combined branch-aware coverage plus the four locked risk-group floors through the existing local and hosted workflows, published separately categorized release notes, and produced one green exact Draft head. The owner waived the additional enriched OCR qualification rather than accepting a receipt that was never produced. Covered by `WQ-17`, `WQ-18`, and `WQ-11`. - -#### Explicit Non-Goals - -- Do not implement or create a future issue for `@bot retest`; the CI-only toolkit has no comment-event receiver. GitLab retry UI/API remains the no-commit mechanism. -- Do not let remediation text authorize, suppress, resolve, change severity, prove remediation, or affect automatic approval. -- Do not add arbitrary discussion search, cross-project retrieval, provider-facing model tools, write-capable MCP methods, or a second model pass. -- Do not migrate repository instruction contracts; only the three approved navigation indexes belong to this release. -- Do not modify or disclose owner-only OCR credentials or endpoint configuration, the user's unrelated `HOME` content, or start a local model peer. No further local OCR or qualification run is authorized after the owner's waiver. -- Do not run a separate Codex Security scan or disable Bandit/Gitleaks/CodeQL. Do not merge, publish stable 0.8.0, or close release issues/milestone before the independent protected lifecycle gates that own those transitions. -- Do not create a coverage framework, coverage JSON parser, or new configuration format; reorganize existing test modules for aesthetics; test unreachable lines or entrypoints merely to increase a percentage; or refactor production code solely for coverage. -- Do not install OCR 1.9.9. Its accepted evidence remains historical; only OCR 1.9.10 is the current integration target. - -#### Constraints - -- The initial planning push and Draft PR already exist. Every subsequent corrective head must be signed, pushed only after its holistic self-review and local gates, and independently requalified by exact-head hosted checks before lifecycle progression. -- Each logical slice requires focused tests, full slice-diff self-review, requirement and trust-boundary reconciliation, `git diff --check`, and a signed commit. -- Apply normalization, bounds, and DLP before admitting any MR title, description, generic discussion, remediation root/reply, or dynamic adapter/reference text to the private store or bootstrap. -- Store no raw GitLab IDs, usernames, provider objects, rejected text, or source locations for rejected values in model projections, receipts, logs, or retained results. -- Keep receipt schema v5 and existing closed source/degradation accounting. -- Treat any admitted remediation bundle as mutable context and force comment-only independently of DLP outcome or semantic content. -- Hosted OCR 1.9.10 compatibility is the primary evidence. Do not download a local OCR binary unless a concrete discrepancy requires it; any optional local check is limited to a checksum-verified temporary Darwin OCR 1.9.10 `--version`, `--help`, or confirmed no-LLM behavior in an isolated temporary `HOME`, followed by removal. -- Preserve all unrelated user work and existing public posting/ownership contracts. -- Reuse pytest-cov, Coverage.py, `scripts/quality.sh`, and the compatibility workflow. Measure branches, run pytest once per full quality execution, and apply group floors through ordinary `coverage report --include=... --fail-under=...` commands. - -#### Inputs And Sources - -- User-approved release plan and follow-up decisions in the active task. -- GitHub issue #120 and milestone `v0.8.0` as the product contract and coordination root. -- `AGENTS.md`, `docs/engineering/project_principles.md`, `docs/development.md`, and `docs/release.md` as repository workflow and boundary owners. -- `docs/configuration.md`, `docs/operations.md`, `docs/gitlab.md`, `docs/review-context.md`, and `docs/security.md` as public product/operator contracts. -- Existing policy/store/provider/MCP/posting implementations and their tests as compatibility baselines. -- GitLab webhook, merge-request pipeline, and retry-job documentation for the `retest` feasibility decision. -- Engineering-workflow 0.8.1 planning/index contract and its pre-edit repository audit. -- Official upstream OCR v1.9.9/v1.9.10 releases, source comparison, hosted release assets/checksums, and the repository OCR compatibility workflow as version-integration evidence. - -#### User Decisions And Answers - -- Navigation-index debt is explicitly in scope because this release changes documentation; instruction-contract migration is not. -- Engineering-workflow 0.8.1 is current and requires no update. -- `OCR_GITLAB_BOT_USER_ID` and other obsolete compatibility/documentation-only variables should be removed rather than merely documented. -- The earlier unconfigured-local-OCR assumption was superseded on `2026-08-24`, and the owner-only configuration was used only for the completed private direct review. Later that day the owner explicitly waived the still-missing enriched-context qualification and prohibited another qualification run. OCR 1.9.9 stays an inherited predecessor; OCR 1.9.10 remains the exact 0.8.0 integration target. -- Mention actions use the correct spellings `suppress` and `resolve`; `supress` is ignored. -- Do not create a future `retest` issue. -- DLP must protect all untrusted MR-derived text, including title, description, every discussion class, remediation roots/replies, and dynamic adapter/reference content, without interfering with safe auto-approval; admitted remediation itself remains an independent comment-only condition. -- Provider-neutral context contracts must remain reusable for a future GitHub adapter: GitLab transport, pagination, identity, and posting stay behind GitLab modules, while the broker consumes only normalized protocols/records. -- Direct agent source review is sufficient for OCR 1.9.10; do not create a separate human-review handoff. Retry-report grouping is private terminal presentation only and must not become toolkit telemetry, receipt input, DLP input, outcome evidence, severity input, or approval signal. -- Coverage work must improve meaningful boundary confidence, not chase unreachable lines. Existing thematic test owners remain in place; a shared helper belongs in `tests/support.py` only after real reuse appears. -- Release notes must let both a production-integration agent and a human distinguish OCR 1.9.9 inherited evidence from OCR 1.9.10 changes, telemetry non-effects, required deployment/migration, coverage-gate changes, and any separately justified runtime bugfix. - -#### Completed Baseline State - -- `main`, `origin/main`, and tag `v0.7.1` resolve to `42f7b9d171694b4cf3384588c941153d2e85e0f6` before branch creation. -- The working tree was clean before this plan write. -- Engineering-workflow 0.8.1 was verified as the active marketplace-managed version. -- The pre-edit workflow audit found only the three approved navigation-index gaps relevant to this release. -- GitHub issue #120 is open in the open `v0.8.0` milestone; no sub-issues existed at plan start. -- Existing policy/store schemas are v1, receipt schema is v5, and slash commands already implement newest-recognized-human-command semantics. - -#### Current Work Queue - -- `WQ-01` (`done`): self-reviewed and committed this first-write plan checkpoint on `codex/v0.8.0-remediation-threads`. -- `WQ-02` (`done`): pushed only the signed planning commit, opened Draft PR #122, created and attached three milestone sub-issues, and appended/read back #120's coordination checklist. No further push is allowed until `WQ-10`. -- `WQ-03` (`done`): added policy v1/v2, remediation policy types, context-store v2, fixed model-only nested projection, `remediation_thread` MCP resource filtering, and architecture/threat-contract updates; focused tests and slice review passed. -- `WQ-04` (`done`): implemented shared validated live identity, one bounded double snapshot, root verification by live bot ID plus exact fingerprint marker, remediation grouping/generic exclusion, command exclusion, and mutation/pagination semantics; focused and adversarial tests passed. -- `WQ-05` (`done`): added provider-neutral forge origins and normalized remediation views, repeated DLP before store, provider DLP rejection accounting, one-snapshot runner composition, nested aggregate budgets, fixed bootstrap non-authority guidance, receipt-v5 comment-only semantics only for admitted remediation, metadata DLP hostile readback, and an import-boundary test; 176 focused tests plus 71 subtests, Ruff, MyPy, slice review, and diff checks passed. -- `WQ-06` (`done`): connected the exact slash/mention parser to the posting snapshot with the authenticated live username; verified `@mr.bot suppress|resolve`, newest-recognized-human precedence, toolkit-owned-root scoping, and bot/system/typo/prose/code/wrong-mention/retest negatives; 171 focused tests plus 90 subtests, Ruff, MyPy, slice review, and diff checks passed. -- `WQ-07` (`done`): removed obsolete environment and production helper-test semantics, made `OCR_USE_ANTHROPIC` fail with explicit protocol migration, published complete categorized variable/default tables, added a source/docs/example exact inventory owner, and recorded durable operator/automation release-note guidance; 354 focused tests plus 116 subtests, Ruff, MyPy, slice review, and diff checks passed; signed commit. -- `WQ-08` (`done`): added a mode matrix and focused recipes, moved and split context policies by discussion/adapter need, documented policy selection and approval effects, added an Accepted decisions creation/consumption walkthrough, removed obsolete migration prose and user-facing terminology, and passed 225 focused tests plus 26 subtests, Ruff, MyPy, slice review, and diff checks; signed commit. -- `WQ-09` (`done`): added three managed navigation indexes, reconciled cross-links/README/strategy/roadmap and public-example terminology, rendered agent/human-readable feature/maintenance/documentation Towncrier fragments, and passed 47 focused tests, Ruff, MyPy, local-link checks, Towncrier draft, the engineering-workflow 0.8.1 index audit, slice review, and diff checks; signed commit. -- `WQ-10` (`done`): holistic requirement/privacy/architecture/documentation self-review and the complete local validation matrix passed; the final signed feature push moved Draft PR #122 to exact head `a196408`, and all 13 hosted CI/security/build checks passed without corrective changes. -- `WQ-12` (`done`): diagnosed scheduled Actions maintenance run 32624698380, implemented UTC-day sharding plus TestPyPI 14-day, ordinary 30-day, and stable Release 60-day completed-run retention, reconciled the live backlog, committed and pushed the reviewed correction at `373fc2d`, and passed all 13 exact-head hosted checks. -- `WQ-13` (`done`): materialized and self-reviewed this OCR 1.9.10/coverage scope correction in a signed local planning commit; hosted `OCR compatibility` run 32648809527 qualified `v1.9.10` successfully at remote head `373fc2d` and created canonical issue #126; created coverage issue #127; attached both to #120 and milestone `v0.8.0`; updated and read back #120 coordination. No automation PR was created and no repository push occurred. -- `WQ-14` (`done`): audited the four-commit official OCR 1.9.9-to-1.9.10 source delta, GitHub asset digests, and hosted probes; integrated exact evidence/manifest, preflight, GitLab example, current docs/default tests, private retry-report non-effect regressions, maintenance-class generator output, and separate actionable OCR release notes. The scan-only and VS Code changes remain outside the review path; no automation PR existed to reconcile. -- `WQ-15` (`done`): added focused fault tests at the existing private-result, parser, preflight, GitLab transport, posting transaction, strict/non-strict, and previous-review owners; covered bounded/atomic result handling, OCR process failures, bounded retry and authenticated reads, non-retried writes, exact partial publication identities, safe error projection, and coverage-dependent cleanup. The complete `artifact -> parser -> posting -> GitLab` review found no production contract defect. -- `WQ-16` (`done`): added focused tests for `MR text -> stable snapshot -> normalization -> DLP -> budget/admission -> store/MCP -> receipt -> approval`; proved exact mixed-source counts, safe title/description/discussion/adapter auto-approval parity, remediation and required-degradation fail-closed behavior, provider-shape rejection, command exclusion, and absence of rejected/provider diagnostics. Existing hostile replay/readback, malformed policy/MCP/receipt, provider-neutral import, non-GitLab fake-provider, no-duplication, and no-remediation-reference-discovery contracts were re-run without restructuring their owners. -- `WQ-17` (`done`): raised the combined branch-aware floor to 85% and added four ordinary scoped Coverage.py reports to the same local/hosted test run; added meaningful result/preflight/GitLab/MCP fault coverage in existing thematic owners; published a separate coverage maintenance fragment; and passed the full quality, manifest, lock, Towncrier, diff, privacy, architecture, telemetry, and data-flow review without a production-code change or test-file reorganization. -- `WQ-18` (`done`): pushed the complete signed local history to Draft PR #122, verified all 13 exact-head hosted checks, and updated PR #122 plus #120 with toolkit 0.8.0, OCR 1.9.10, exact commit/tree/checksum, inherited-only OCR 1.9.9 status, and the external qualification operation. -- `WQ-11` (`done`): on `2026-08-24` the user explicitly authorized this agent to perform the qualification and continue through the full stable-release lifecycle. The first production `ocr-ci review` completed 36 of 37 selected files and returned eight candidates. Seven confirmed boundary defects were corrected with focused regressions; the receipt-class proposal was rejected because receipt v5 capability classes are intentionally fixed. The second ordinary production review completed all 38 selected items at signed head `f962d85c48e9cc081ffe47e225024d1d02162f0a` with OCR 1.9.10, `--max-tools 60`, concurrency `4`, 46 attributed evidence calls, cleanup `passed`, and no failed coverage. Its six candidates reduced to four confirmed runtime gaps, now corrected with focused regressions: TestPyPI development-run retention cannot undercut its release-log retention; operator adapters cannot request internal `remediation_thread` resources; publishable generic discussion/reference text gets publication-mode DLP; and per-record text-budget omissions remain distinct from invalid DLP rejection. Remediation-driven external reference discovery and root-only remediation admission remain rejected by the explicit locked product contract. A bounded local-only `ocr.private-dlp-decisions/v1` sidecar now attributes conservative DLP decisions by safe path, subtype, size, and digest without raw values or ordinary-CI/receipt changes. Two private historical advisory runs were inspected without transferring their identifiers or content into public artifacts: both contained OCR's soft background-size warning, while one also ended before a usable result/manifest with only a generic LLM configuration/authentication failure. Exact historical refs were then replayed through the current toolkit-owned collection/composition/bootstrap chain without an LLM; both `off` and `metadata` projections stayed naturally below the installed OCR's recommended threshold. To keep this true when supported OCR releases change their limits, toolkit 0.8.0 does not expose or hardcode OCR background thresholds. Before model execution it runs the same preflight-qualified OCR executable with the exact production refs, selection inputs, rules, and background under `review --preview`; a recognized OCR soft warning enters the bounded CI log and atomically finalized result warnings, while a recognized hard rejection stops before the model and persists only an identity-bound closed numeric failure status for static MR reporting. Unknown preview failures fail closed as generic preflight errors, and the actual review independently revalidates the same background. The complete corrective quality/security/package gates pass, and signed corrective commit `a76a790aacc3ff7d1b4bd225fbec1515caa03968` is published in Draft PR #122. The exact plan-reconciled head `c88e069f1534c41ff1e2fc05fbf9050ca95b9d5e` then passed all hosted checks with no active review thread. The owner subsequently waived the separate enriched-context `ocr-ci review` receipt and requested no qualification run. Consequently `context_list`/`context_get`, still-present/evidence-resolved behavior, and the receipt-level leakage audit are not claimed as externally qualified release evidence; this explicit waiver removes only that plan-specific gate and permits the protected lifecycle to continue. -- `WQ-19` (`done`): the user explicitly superseded the earlier no-rerun decision and authorized a locally configured exact-range OCR 1.9.10 review with `--max-tools 60`. The configured custom OpenAI-protocol gateway failed all 55 logical requests at both concurrency `4` and a diagnostic concurrency `1`, with 275 retries and only HTTP 429 rate-limit responses; this excludes tool-round exhaustion, context-size rejection, credential rejection, and toolkit execution as the failure class, so that backend will not be retried again under the two-failure rule. A materially different configured Anthropic run at concurrency `2` then completed all 43 selected files in 15m29s with zero failed/reused/waived coverage, 18 candidates, and 203 tool calls; no file exhausted its tool rounds. Future ordinary local OCR runs use concurrency `2`: four made the rate-limited failure noisier and one is unnecessarily slow. The direct OCR result is private remediation input rather than an enriched toolkit receipt because it did not run through `ocr-ci review` or exercise `context_list`/`context_get`. Static trace reduced its 18 candidates to four small confirmed correctness/maintainability defects plus one structured-rejection cleanup defect: truncate multi-command quality logs per invocation, avoid duplicate DLP encoding, replace two impossible-state runtime assertions with explicit provider errors, and preserve an in-flight OCR background rejection when preview cleanup also fails while still failing closed on cleanup-only failure. Aggregate risk-group coverage, fixed receipt classes, retention policy, minimum two-item remediation admission, strict OCR threshold comparison, root-only omission, empty normalized-text line accounting, and the remediation reply-order maximum remain intentional or already closed by stronger sequence/count invariants. Focused regressions, the full corrective-diff self-review, the canonical quality/security/package gates, and public-diff privacy review all pass; `WQ-11` records the subsequent owner waiver without claiming a separate enriched-context receipt. - -#### Locked Decisions - -- Policy v2 is additive and v1 remains valid for existing enriched configurations. -- Context store moves to private schema v2; remediation records are opaque, bounded, local, read-only, and non-provider-addressable. -- Root ownership requires both live bot ID equality and a valid toolkit marker/fingerprint. -- Generic discussion and remediation projections derive from one stable double snapshot; an admitted remediation thread is excluded from generic records and from external-reference discovery. -- Mention parsing is exact whole-reply matching for the live username and shares existing slash-command lifecycle semantics. -- DLP rejection affects only the admission/degradation state of the untrusted source being inspected. It cannot turn a review into approval; safe MR metadata, generic discussions, and adapter/reference context must not themselves disable otherwise valid receipt-based auto-approval. -- Any successfully admitted remediation record forces comment-only even when its text is safe. -- The separate enriched real-path qualification is waived by the owner; its receipt is absent and must not be claimed. Stable publication remains governed by the protected feature/release PR, registry, provenance, artifact, and external-readback gates. -- Actions maintenance retains a ten-page cap per collection shard. Scheduled workflow-run acquisition uses a closed UTC-day window; completed TestPyPI preview runs are retained for 14 days, TestPyPI development and ordinary runs for 30 days, and stable Release runs for 60 days. A run is not deleted before its longer promised log-retention window. Active runs and newer completed runs are never deletion candidates. -- Generic `ocr_toolkit.context` modules must not import `providers.gitlab*`; GitLab produces the common discussion/remediation views at the composition edge. A future GitHub implementation may satisfy the same views without inheriting GitLab API or identity semantics. -- OCR 1.9.9 is an inherited predecessor qualified for toolkit 0.7.1; its evidence and historical changelog stay intact. OCR 1.9.10 is the only accepted preflight version and GitLab example pin for toolkit 0.8.0. Its Linux amd64 SHA-256 is `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. -- OCR 1.9.10 terminal retry output may group failures by review stage, while `ocr.llm-retry-report/v1`, result, and manifest contracts remain unchanged. `ocr scan` background wait/resume changes are outside the toolkit's `ocr review` path. Retry reports remain private and non-authoritative. -- Installed, preflight-qualified OCR owns its current background warning and rejection thresholds. The toolkit keeps its compact bootstrap independently bounded, exposes no threshold setting, and duplicates no OCR threshold as a runtime constant; an exact `ocr review --preview` pre-model gate classifies the generated background using the same OCR executable and production selection contract. -- Combined branch-aware coverage has an 85% floor. Risk-group floors are: `ocr_result + preflight` 80%; posting workflow + GitLab + snapshot + GitLab approval 80%; review runner + context broker/store/DLP + approval 85%; MCP config + GitLab context providers + policy/result contracts 85%. - -#### Verification - -- Planning/coordination: inspect branch base, signed commit, remote Draft PR state, sub-issue parent relations, milestone assignments, and #120 checklist readback. -- Contracts/store/MCP: focused policy, store, broker, MCP, receipt, runner, posting-approval, cleanup, and installed-artifact tests with a controlled subprocess peer. -- Architecture: an import-boundary test proves generic context contracts/broker/store/MCP do not depend on GitLab provider modules; a non-GitLab fake view must project through the same remediation broker contract. -- Provider/adversarial: stable and mutated double snapshots; edit/delete/reorder/pagination drift; thread/reply/item/age/text bounds; prompt injection; Unicode, Markdown, and HTML laundering; PII/secrets across MR title, description, generic discussions, remediation roots/replies, and dynamic context; fake bot roots; system/automation events; conflicting/oversized replies. -- Commands: slash/mention parity; mixed-case username/action; whitespace boundary; typo, prose, code blocks, wrong mention, bot/system reply, and non-toolkit-owned discussion negatives; newest recognized human command wins. -- Approval safety: DLP-clean MR title/description, generic discussions, and dynamic context without admitted remediation preserve existing receipt-based auto-approval; any admitted remediation forces comment-only; a DLP-rejected source cannot enable approval; posting suppression/fingerprint/human ownership/resolve rollback remain unchanged. -- Environment/docs: exact supported variable/default inventory test; removal search for deleted names and user-facing `synthetic`; link and example checks; current schema compatibility and retest limitation documented. -- Release notes: use exact operator-facing delta labels (`Added`, `Changed`, `Removed`, `Migration`) when an objective spans multiple effects; name symbols, defaults, before/after behavior, and replacements rather than relying on a category heading. For v0.8.0, list removed environment variables in a dedicated `maintenance` fragment and categorize all other fragments by their actual user-visible effect. -- Repository gates: focused tests per slice, `git diff --check` per commit, final `scripts/quality.sh check`, `scripts/gitleaks.sh`, lock/OCR-manifest checks, Towncrier draft, reproducible packages, Twine checks, and clean installs on Python 3.12, 3.13, and 3.14. -- Hosted gates: final feature push must pass required GitHub Actions including CodeQL; no weakening or bypass. -- OCR integration: dispatch hosted `OCR compatibility` for `v1.9.10`; verify official release/source delta, Linux amd64 checksum, generated evidence, manifest/recommended/preflight/example consistency, compatibility probes, private retry-report behavior, and maintenance fragment generation. -- Result/preflight/GitLab boundaries: cover private result limits, hostile types, inode replacement, short writes/atomic cleanup, malformed or oversized JSON, stderr redaction, missing/timeout/non-zero/wrong OCR, bounded preflight reads/retries/deadlines/offline validation, GET-only retry, `Retry-After`, malformed/oversized provider responses, authenticated `/user`, ambiguous create, partial draft publish, exact transaction identities, rollback ownership, strict/non-strict failures, and previous-review preservation. -- Context/DLP/approval boundaries: verify safe MR/context approval parity; admitted-remediation comment-only; DLP/mutation/required degradation denial; optional degradation isolation; generic/remediation deduplication; no remediation reference discovery; exact mixed-source counts; no rejected text or raw identity in projections; hostile store/replay failure; provider-neutral imports/fake provider; malformed policy/MCP inputs; and impossible receipt-state rejection. -- Coverage: after one branch-aware pytest run, require combined 85% and the four locked group floors using ordinary Coverage.py include reports in both `scripts/quality.sh` and hosted test execution. -- Waived external qualification: no enriched receipt exists for OCR 1.9.10 `context_list`/`context_get`, still-present/evidence-resolved scenarios, or receipt-level raw-data leakage inspection. This is an explicit owner waiver, not a successful qualification or a replacement for the completed deterministic tests, direct OCR remediation review, hosted checks, package gates, or stable-release external readback. - -#### Latest Validation Results - -- `2026-08-22`: pre-edit `git status`, `git fetch`, and revision comparison passed; local `main` equals `origin/main` at `42f7b9d` and the tree was clean. -- `2026-08-22`: engineering-workflow 0.8.1 pre-edit audit reproduced missing indexes only at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md` for the approved index scope. The audit also enumerated protected/unknown repository-owned documents that will not be bulk-rewritten. -- `2026-08-22`: the planning slice passed complete diff review, requirement/trust-boundary reconciliation, required-section checks, and `git diff --check`; the planning commit is signed with the configured SSH key (local signature trust display requires an `allowedSignersFile`). -- `2026-08-22`: Draft PR #122 is open at planning head `c10fb8f`; #120 has exactly three open v0.8.0 children (#123, #124, #125) with corrected literal-safe bodies, parent links, and a read-back coordination checklist. -- `2026-08-22`: policy/store/MCP contract slice passed 44 focused tests, Ruff format/check, MyPy for the context package, full slice diff review, trust-boundary reconciliation, and `git diff --check`. Store v2 hostile-read tests reject nested DLP violations, inconsistent order/counts, raw extra fields, toolkit-bot replies, and remediation data outside its exact model-only placement. -- `2026-08-22`: GitLab acquisition/identity slice passed 225 focused provider/store/posting tests plus 78 subtests, Ruff format/check, full-package MyPy, real local TLS transport, and `git diff --check`. Tests cover live ID/username validation, stable double reads, edit/delete/reorder/pagination/identity mutation, forged roots, DLP rejection, command exclusion, bounded pagination, run-local pseudonyms, and absence of raw thread/display/path data in returned projections. -- `2026-08-22`: environment/configuration slice passed 354 focused runtime, provider, posting, OCR-compatibility, and documentation tests plus 116 subtests; the single-owner environment contract separately passed source-name inventory, categorized table/default, redaction-only, removal, and public-example checks. Ruff, MyPy, full slice diff/self-review, trust-boundary reconciliation, and `git diff --check` passed. -- `2026-08-22`: examples/public-documentation slice passed 225 integration, policy, adapter, MCP, runtime, evidence, and documentation tests plus 26 subtests. Runtime parsers validated both v2 policy recipes, stdio/remote adapter recipes, direct-MCP mode JSON, and the Accepted decisions example; documentation tests enforce the mode matrix, discussion-policy choice guide, later-MR list/get walkthrough, removed migrations, retest boundary, and absence of user-facing `synthetic` labels. Ruff, MyPy, full slice self-review, trust-boundary reconciliation, and `git diff --check` passed. -- `2026-08-22`: navigation/release-note slice passed 47 integration, documentation, release-note, and environment-contract tests. Ruff, MyPy, local Markdown target checks, and a rendered 0.8.0 Towncrier draft passed; the dedicated maintenance section enumerates every removed variable and replacement, while feature/documentation sections distinguish added, changed, and migration behavior. Engineering-workflow 0.8.1 reported all three managed indexes required, fully indexed, and error-free. Full slice self-review, provider-neutral/approval-state reconciliation, and `git diff --check` passed. -- `2026-08-22`: after the host environment limitation was removed, the canonical isolated quality environment was rebuilt with system CPython 3.14.7. `scripts/quality.sh check` passed Ruff format/check, strict MyPy, Bandit, 1,063 tests plus 203 subtests, and 82.66% coverage. The final tree retains the stronger isolated PEP 517 distribution-content test and stdlib-venv installed-artifact tests; temporary workaround commits are superseded by the restoring commit without rewriting review history. -- `2026-08-22`: `scripts/gitleaks.sh` passed with the repository-pinned Gitleaks 8.24.3 obtained only in a temporary directory from the official archive after verifying SHA-256 `b90f13bb8c90ab72083d9b0c842e39dafb82c0e5c3f872f407366b7a58909013`; no global installation changed and no findings were reported. `uv lock --check`, `scripts/ocr_compat.py validate`, the Towncrier 0.8.0 draft, and `pip-audit` also passed; pip-audit reported no known dependency vulnerabilities and only the expected local-project registry skip. -- `2026-08-22`: two clean `0.8.0.dev0` builds were byte-identical: wheel SHA-256 `11059a9a56e049fe420ac784126dfcc75b3d08d5b2470f9f53d44dfe7ea3b7eb` and sdist SHA-256 `03d18b3d8ac88294c4e542203299ffe5dc7c0d2e88e359fb26e48710681fb6cf`. Twine passed, and hash-locked wheel and sdist installs each passed `pip check`, isolated version import, `ocr-ci --version`, and `ocr-ci --help` on Python 3.12, 3.13, and 3.14. -- `2026-08-22`: holistic diff review passed requirements, privacy, architecture, documentation, omission, and trust-boundary reconciliation. Policy v1 is accepted only for published configuration compatibility while the private store has only schema v2; generic context modules do not import GitLab providers; remediation content remains model-only and comment-only; safe non-remediation MR context preserves approval eligibility; DLP rejection fails closed; exact slash/mention lifecycle parsing retains `@mr.bot resolve`; removed inputs occur only in rejection/migration/tests/history contracts. `git diff --check` passed and every feature-branch commit contains its SSH signature header (local trust display still requires an `allowedSignersFile`). No OCR binary, LLM endpoint, model peer, user `HOME`, credentials, or global OCR installation was used or changed. -- `2026-08-23`: scheduled Actions maintenance run 32624698380 failed because 1,015 completed runs inside its 44-day bounded window filled all ten 100-item aggregate pages. Manual attempt 2 on unchanged `main` head `42f7b9d` reproduced the same `workflow_runs exceeded 10 pages` failure, excluding a transient runner or network explanation. -- `2026-08-23`: the maintenance correction keeps ten pages as a fail-closed per-UTC-day bound and permits more than ten aggregate pages across the closed 74-day lookback. Tests cover 1,100 records across 11 shards, a full ten-page single-day rejection, non-overlapping run identities, exact TestPyPI/ordinary/Release retention, active-run exclusion, and elimination of redundant log deletion when a run itself is due. Focused tests, Ruff, MyPy, documentation/release-note contracts, `git diff --check`, lock/OCR-manifest checks, and Towncrier draft passed. -- `2026-08-23`: canonical CPython 3.14.7 `scripts/quality.sh check` passed 1,067 tests plus 203 subtests at 82.66% coverage, including Bandit. Checksum-verified repository-pinned Gitleaks 8.24.3 also passed without changing the global 8.30.1 installation. -- `2026-08-23`: the new code produced a read-only live plan of 697 objects, then deleted exactly 697 with zero already absent: 4 stale caches, 76 expired/old artifacts, 407 due log archives, and 210 completed runs selected by the 14/30/60-day policy. Completed-run count fell from 1,015 to 805; 80 fresh artifacts and three retained caches remained. The post-cleanup dry-run contained no run, artifact, or cache candidate; it reselected 407 log IDs only because GitHub does not expose log-archive absence and the existing 14-day idempotent retry window intentionally retries them as 404-safe candidates. -- `2026-08-23`: the signed local planning commit materialized the OCR 1.9.10 and coverage scope without a push. Hosted compatibility run 32648809527 succeeded at remote head `373fc2d`; `qualify-v1.9.10` passed and canonical issue #126 was created, while the automatic-patch/PR steps correctly remained skipped. OCR issue #126 and coverage issue #127 are open children of #120 in milestone `v0.8.0`, and #120's updated coordination block was read back. -- `2026-08-23`: direct OCR 1.9.10 review confirmed terminal-only retry grouping, scan-only background/resume changes, and an out-of-scope VS Code change; official asset metadata and hosted evidence agree on Linux amd64 SHA-256 `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. Manifest validation, 411 focused tests plus 116 subtests, Ruff, and the rendered Towncrier section passed. Retry-report regressions prove private DLP sanitization leaves canonical publication/approval inputs unchanged and never publishes stage/provider/path details. -- `2026-08-23`: private-result and GitLab transaction boundary tests now cover descriptor short reads, short writes and atomic cleanup, inode replacement, hard size bounds, OCR missing/timeout/non-zero behavior, bounded and redacted preflight retries, authenticated identity/project/MR reads, bounded `Retry-After`, write non-retry, partial draft publication identities, safe parse/provider failure notes, strict/non-strict exits, and completeness-dependent prior-review cleanup. All 253 tests plus 121 subtests in the affected files, Ruff, and diff checks passed; no production defect or version-specific generic docstring was introduced. -- `2026-08-23`: context-flow regressions now prove safe MR metadata plus generic discussion/adapter data preserves approval eligibility, while admitted remediation, DLP rejection, required degradation, mutation, and impossible provider shapes remain closed and comment-only. Mixed sources produce exact closed counts, remediation commands and rejected/provider values never enter the store/receipt, and the provider-neutral `codehost` projection still crosses the common broker. The affected context matrix passed 230 tests plus 71 subtests; a full run excluding the environment-broken installed-policy venv case passed 1,113 tests plus 208 subtests at rounded 84%, with the context/approval risk group already at 85% and the policy/provider group at 82% before the final coverage slice. -- `2026-08-23`: after rebuilding only the ignored disposable quality environment on the now-available system CPython 3.14.7, the complete installed-artifact-inclusive suite passed 1,136 tests plus 275 subtests at 85.74% combined branch coverage. The four locked groups passed at 82%, 81%, 85%, and 86%; `scripts/quality.sh check` also passed Ruff format/check, strict MyPy, and Bandit. Local and hosted workflows use the same single pytest run plus four ordinary scoped reports, `uv lock --check`, OCR manifest validation, Towncrier draft, and `git diff --check` passed, and the coverage fragment describes the new gates for both deployment agents and humans. -- `2026-08-23`: the two preceding boundary-test commits were amended before publication so every newly introduced test has a concise contract docstring; all five affected test owners passed 356 tests plus 121 subtests before the history rewrite, both rewritten commits retain SSH signature headers, and generic docstrings/comments do not unnecessarily pin an OCR version. The final coverage slice likewise keeps every new test documented and leaves the thematic file layout unchanged. -- `2026-08-23`: exact-head hosted CodeQL passed its analysis job but reported one high-severity clear-text-storage alert in a test that intentionally wrote an `OCR_LLM_TOKEN` redaction sentinel to a temporary stderr artifact. Production redaction and its separate real artifact/subprocess test were unaffected. The orchestration test now receives an already redacted excerpt at the reader boundary, retains details/strict/quick-action/previous-review assertions, and no longer stores a credential-classified value or suppresses the scanner. -- `2026-08-24`: Draft PR #122 and `origin/codex/v0.8.0-remediation-threads` both resolve to signed head `6691ab56da733175fdda92502d31aab808320ec1` and tree `0c2c6ecf0f85daa7574bfe54af10fed8acb2797d`; all 13 hosted checks pass and the only review thread is resolved/outdated. The PATH-effective `/Users/xeon/.local/bin/ocr` was atomically updated from 1.9.8 to official Darwin arm64 OCR 1.9.10, and size `54576370` plus SHA-256 `c626347bafcdbf25cf058af403d16568a3a9ffa1814046ff7c9d1e6becaf60d2` match the committed compatibility manifest and GitHub Release metadata. The previous 1.9.8 binary remains as an explicit local rollback copy. -- `2026-08-24`: the first authorized full production review ran checksum-verified OCR 1.9.10 with the owner-only configured LLM gateway over exact range `42f7b9d171694b4cf3384588c941153d2e85e0f6..8a00cb67bdd42144893c33879c8767d0f474e5d0`. It exited successfully with a private `partial` result: 36 of 37 selected files completed, `src/ocr_toolkit/context/broker.py` exhausted the model tool-round limit, eight findings were returned, and the toolkit evidence service handled 47 calls without persisting the configured secret. Static source/call-site validation confirms seven bounded-input/completeness defects and rejects the receipt-class proposal as inconsistent with the existing closed capability-class contract. The result remains private under `.quality-logs/`; it is qualification input, not an accepted release receipt, and requires a complete rerun after corrective work. -- `2026-08-24`: the corrective slice adds seven focused regression classes plus the requested CI tool-round and local diagnostic contracts. All 177 tests in the eight changed owners pass; the canonical isolated full gate passes 1,151 tests plus 275 subtests at 85.84% combined branch coverage, with the four locked groups at 82%, 81%, 85%, and 87%. Ruff, strict MyPy, Bandit, `git diff --check`, the rendered 0.8.0 Towncrier draft, and a complete runtime/test/documentation self-review pass. Ordinary runs retain deterministic cleanup and receipt v5; local diagnostic retention is explicitly non-posting, and the GitLab MR profile proves rejection before OCR plus session cleanup. The next accepted OCR review uses the ordinary path with `OCR_MAX_TOOLS=60` and concurrency `4`. -- `2026-08-24`: the second ordinary production review at signed head `f962d85c48e9cc081ffe47e225024d1d02162f0a` and tree `7428d36ad93bf7343cd23ba42306536ea168f3ca` passed the exact-range qualification with OCR 1.9.10: 38 selected, 38 completed, no failed or waived items, concurrency `4`, 46 verified `ocr_toolkit_evidence` calls, and successful private cleanup. The result is complete rather than partial. Its private-only DLP aggregate reflects one technical run ID in two schema locations, not repository or GitLab PII; the phone-like detector classified the identifier conservatively and both values were replaced by one stable redaction token without changing the canonical publication projection. -- `2026-08-24`: the four confirmed second-review gaps and local DLP observability gap are corrected. The sidecar has a 1,000-decision and 32-segment path bound with explicit omitted counts; rejected keys/values are identified only by bounded safe path, closed reason/subtype, size units, and digest. Focused validation passes 220 tests, Ruff, strict MyPy over 101 source files, `git diff --check`, and a targeted public-diff privacy scan. A private historical advisory-job readback confirms only a generic pre-result LLM configuration/authentication failure and allowed-to-fail green pipeline; it contains no evidence of tool-round exhaustion, token-budget stop, timeout, or a more specific credential cause, and none of its identifiers or contents enter repository artifacts. -- `2026-08-24`: holistic corrective-tree self-review closed the privacy/DLP, capability-class, retention, preview/model ordering, stale-result, static-reporting, documentation, and threshold-ownership boundaries without another finding. The final canonical quality gate passes 1,178 tests plus 277 subtests at 85.89% combined branch coverage, with the four locked groups at 83%, 81%, 85%, and 87%; Ruff, strict MyPy, and Bandit pass in the same run. Lock and OCR-manifest validation, the rendered 0.8.0 Towncrier draft, dependency audit, pinned Gitleaks 8.24.3, `git diff --check`, and public-diff privacy checks pass. Two deterministic 0.8.0 wheel/sdist builds are byte-identical, Twine and archive-content/privacy checks pass, and clean wheel plus sdist installs smoke successfully on Python 3.12, 3.13, and 3.14. The test-evidence matrix now records the installed-OCR preview owner and the bounded value-free local DLP attribution non-claim. The installed preflight-qualified OCR remains the sole owner of current background thresholds; the toolkit exposes no threshold setting and does not treat its independent compact-renderer budgets as OCR production limits. -- `2026-08-24`: the user-designated final local OCR invocation exercised the exact enriched provider fixture and OCR-owned background warning path but made no model call because its private launcher selected an unsupported gateway protocol. No qualification receipt was accepted and local OCR will not be invoked again. The failed ordinary run exposed three retained toolkit inputs; the cleanup correction now removes the complete ephemeral input/receipt/DLP set after success or failure while preserving only closed static pre-execution status. Focused tests passed 99 cases, and the canonical gate passed 1,180 tests plus 277 subtests at 85.90% combined branch coverage with risk groups at 83%, 81%, 85%, and 87%; release contracts, pinned Gitleaks, privacy review, and diff checks also passed. -- `2026-08-24`: the authorized final direct OCR review completed all 43 selected files with OCR 1.9.10, `--max-tools 60`, concurrency `2`, 18 private candidates, 203 tool calls, and no failed/reused/waived coverage or tool-round exhaustion. Static trace and holistic self-review accepted five bounded corrections and rejected the remaining candidates against stronger existing contracts. The expanded focused/documentation/release matrix passes 234 tests; the canonical gate passes 1,185 tests plus 277 subtests at 86% displayed combined branch coverage with locked groups at 83%, 81%, 85%, and 87%, plus Ruff, strict MyPy, and Bandit. Lock and OCR-manifest validation, dependency audit, pinned Gitleaks, Towncrier draft, `git diff --check`, and public-diff privacy review pass. Two explicitly versioned 0.8.0 builds are byte-identical; Twine, archive-content/privacy checks, and clean wheel/sdist install plus CLI smoke on Python 3.12, 3.13, and 3.14 pass. Signed corrective commit `a76a790aacc3ff7d1b4bd225fbec1515caa03968` is published without rewriting history; the PR remains Draft pending exact-head hosted checks and the separate enriched `ocr-ci review` receipt. -- `2026-08-24`: exact plan-reconciled head `c88e069f1534c41ff1e2fc05fbf9050ca95b9d5e` passed every hosted CI, build, dependency, secret, Bandit, and CodeQL check; the only review thread is resolved and outdated, the signed local and remote heads match, and Draft PR #122 is clean. The owner then explicitly waived the still-missing enriched-context qualification and requested no qualification run. Release progression therefore records that receipt as absent and waived, not passed. - -#### Risks And Recovery - -- Risk: DLP coverage misses an MR-derived text path or becomes accidentally coupled to approval eligibility. Recovery: inventory title, description, generic discussions, remediation roots/replies, and adapter/reference inputs at their admission boundaries; keep DLP results inside per-source enrichment state; assert safe-context approval parity and separately assert admitted-remediation comment-only behavior. -- Risk: provider drift creates mixed or duplicated projections. Recovery: compare canonical complete snapshots including identity and ordering; emit only closed `mutated`, `partial`, or `unavailable` state and commit no partial store. -- Risk: marker-like user content is treated as toolkit ownership. Recovery: require active bot ID plus strict marker/fingerprint parsing and cover forged roots adversarially. -- Risk: raw provider identities leak through diagnostics or receipts. Recovery: retain run-local pseudonyms only, assert serialized artifacts/log capture, and discard rejected values without locations. -- Risk: documentation inventory drifts from runtime. Recovery: own the supported/default inventory in executable contract data and compare public tables/examples against it. -- Risk: a corrective push is treated as accepted before hosted checks bind to that exact head. Recovery: record the exact commit/tree, require all hosted checks again, and keep the PR Draft until exact-head checks and review threads are accepted. -- Risk: the waived enriched qualification leaves no external receipt for model use of `context_list`/`context_get` or its receipt-level leakage audit. Recovery: retain the waiver in the archived plan and release coordination, never claim that evidence, and reopen a separately authorized qualification or corrective release if later production evidence invalidates the deterministic contracts. -- Risk: coverage work rewards artificial tests or distorts production boundaries. Recovery: target listed fault/data-flow contracts in their existing owners, reject percentage-only entrypoint/unreachable-line work, and change production only for a demonstrated contract defect. -- Risk: OCR version prose conflates inherited 1.9.9 evidence with the 1.9.10 deployment target. Recovery: keep separate headings in compatibility docs and the OCR maintenance fragment and assert exact manifest/preflight/example defaults. -- Risk: grouped retry diagnostics leak or influence decisions. Recovery: assert the report stays in private result handling and cannot feed telemetry, DLP, receipt, severity, outcome, or approval. - -#### Resume Point - -Commit and push this owner-waiver plan checkpoint, require hosted checks on that exact head, then move Draft PR #122 to ready only after the checks and review-thread readback pass. Continue through the protected feature merge, TestPyPI development reconciliation, release PR, stable publication, immutable external readback, issue/milestone closure, synchronized `main`, and final scratch cleanup. Do not run another local OCR qualification or claim the absent enriched receipt. - -#### Plan Fidelity Check - -- [x] Every user-requested outcome has a stable `REQ-###` entry and one or more ordered work-queue owners. -- [x] Release-required implementation and release-deferred stable delivery are both explicit. -- [x] GitHub writes, push ordering, commit gates, and issue/milestone non-closure are preserved. -- [x] Full MR-text DLP coverage, auto-approval independence, comment-only remediation, identity, privacy, and mutation trust boundaries are explicit. -- [x] Local OCR/LLM qualification authorization, inherited OCR 1.9.9 evidence, exact OCR 1.9.10 target, owner-only configuration, and secret non-disclosure are explicit. -- [x] Meaningful boundary-test scope, non-overengineering limits, combined coverage, and four risk-group floors are explicit. -- [x] Validation covers functional, adversarial, artifact, documentation, release, and hosted gates. -- [x] Non-goals preserve the retest and instruction-migration decisions. -- [x] The Resume Point names the first safe unfinished action. - -#### Reconciliation Check - -- [x] Draft PR and remote feature head `6691ab5`, its 13 hosted checks, issue/milestone state, review threads, workflow version, and local OCR/configuration baseline were read back before the three signed corrective commits and the final local cleanup correction. -- [x] The work queue preserves every logical slice and records the external qualification as explicitly waived rather than completed. -- [x] No existing completed work is represented as pending implementation. -- [x] No release, merge, issue closure, or external qualification is claimed complete. - -#### Closure Gate - -- [x] All in-scope `REQ-###` items are `done`; `WQ-11` records the owner waiver and does not claim a qualification receipt. -- [x] Each new logical slice has focused test evidence, full diff self-review, boundary reconciliation, `git diff --check`, and a signed commit. -- [x] Holistic privacy, architecture, requirements, telemetry, data-flow, documentation, and omission review is complete with no unresolved findings. -- [x] The final local validation matrix and hosted CI are green for exact feature head `c88e069f1534c41ff1e2fc05fbf9050ca95b9d5e`; the waiver-only checkpoint requires its own hosted readback before readiness. -- [ ] `PLANS.md`, roadmap/strategy, Towncrier fragments, PR, issues, milestone, and remote refs agree that implementation is complete and protected release delivery is active with the enriched receipt explicitly waived. -- [ ] Plan lifecycle validation succeeds before any eventual closure transition. - -#### Post-Close Delivery - -- Initial planning push, Draft PR, final implementation push, and hosted CI are complete through `WQ-18`. -- The user waived the remaining enriched qualification on `2026-08-24`; no receipt is accepted or claimed. Ready-for-review transition, exact-head merge, TestPyPI development reconciliation, release branch/PR, stable publication, and issue/milestone closure remain separately gated lifecycle states. -- If external evidence invalidates an assumption, reopen active corrective work rather than rewriting completed validation history. - -#### Handoff Notes - -- Do not push implementation commits individually. Keep all new slices local until `WQ-17` is complete; push once at `WQ-18`. -- Do not start another local OCR or enriched qualification run. Keep owner-only OCR configuration, private results, and endpoint/model/token details out of tracked history and public release surfaces. -- Keep OCR 1.9.9 inherited and OCR 1.9.10 changed/deployed text separate in evidence, docs, changelog, PR, and #120. -- Keep #120's existing core body and explicit non-goals intact; append coordination only and track mention behavior in its own child issue. -- When resuming after interruption or compaction, read this plan, inspect `git status` and local/remote commit graphs, reconcile requirement/queue states, and continue from the first non-terminal queue item. +No active or blocked repository work. diff --git a/ROADMAP.md b/ROADMAP.md index d6ecf69..16adc14 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -11,7 +11,7 @@ flowchart LR M0 --> M3["M3 External MCP hardening
established"] M1 --> M2["M2 Ecosystem and framework coverage
established"] M1 --> M4["M4 Policy and project guidance
established"] - M1 --> M5["M5 Bounded review-context enrichment
established / in progress"] + M1 --> M5["M5 Bounded review-context enrichment
established"] M3 --> M5 M4 --> M5 M1 --> M6["M6 Profiles and quality measurement
planned / conditional"] @@ -35,7 +35,7 @@ flowchart LR | M2 Ecosystem and framework coverage | Established | Supply framework and template evidence selected from demonstrated use without creating framework-specific review engines. | Established evidence, snapshot/delta, scoped-completeness, and built-in MCP contracts. | Selected static plugins and template review rules have deterministic fixtures, bounds, provenance, component ownership, completeness, first-class source/target delta queries, installed-artifact validation, verified use through the existing built-in MCP, and independently read-back stable delivery. | | M3 External MCP hardening | Established | Qualify and document the safe-use envelope and residual limits of the shipped generic external-MCP composition boundary. | Existing external MCP and built-in composition plus BL-011 real-OCR qualification. | Canonical security and configuration guidance records the direct-composition trust boundaries, tool-name allowlist limits, server-owned object authorization, shared plan/main exposure, response/session persistence, failure degradation, and receipt non-claims observed with checksum-verified OCR and a real synthetic stdio peer. Managed OAuth remains conditional. | | M4 Policy and project guidance | Established | Supply relevant target-branch decisions and guidance without allowing self-whitelisting. | Evidence scoping and target/source snapshots. | Stable delivery independently proves backward-compatible structured decisions, bounded target-derived guidance, one read-only MCP lifecycle, and closure of the tracked release work. | -| M5 Bounded review-context enrichment | Established / in progress | Extend invocation evidence with bounded forge discussions, verified remediation history, and optional external records through one provider-neutral, capability-constrained context lifecycle, without a second review engine. | Established M1, M3, and M4 boundaries plus the v0.7.0 BL-023 delivery. | v0.7.0 establishes bounded discussion/reference acquisition. The v0.8.0 extension remains in progress until exact-head external OCR+LLM qualification proves policy-v2 remediation selection, context-store v2 and fixed MCP projection, live bot-root/mention identity, DLP isolation, comment-only remediation, provider-neutral reuse boundaries, and no raw provider-data leakage. The protected release workflow and independent external readback remain mandatory delivery evidence rather than repository-authored claims. | +| M5 Bounded review-context enrichment | Established | Extend invocation evidence with bounded forge discussions, verified remediation history, and optional external records through one provider-neutral, capability-constrained context lifecycle, without a second review engine. | Established M1, M3, and M4 boundaries plus the v0.7.0 BL-023 delivery. | v0.7.0 establishes bounded discussion/reference acquisition. The v0.8.0 release tree adds policy-v2 remediation selection, context-store v2 and fixed MCP projection, live bot-root/mention identity, DLP isolation, comment-only remediation, and provider-neutral reuse boundaries. The owner waived the separate enriched OCR+LLM qualification, so no receipt proves model-time `context_list`/`context_get`, still-present/evidence-resolved scenarios, or receipt-level raw-data leakage inspection. Protected release publication and independent external readback remain mandatory delivery evidence but do not replace that absent qualification. | | M6 Profiles and quality measurement | Planned / conditional | Audit current OCR telemetry and result-derived review signals; add model-profile aliases only after demonstrated operational need. | Established receipt-v5 result, discussion, coverage, posting, normalized token, and reconciled MCP/evidence-use signals; a demonstrated alias need and owner-approved matrix are required only for profile implementation. | The audit either proves current bounded reporting sufficient or isolates a separately scoped provider-neutral gap; any later model profiles remain independent from explicit coverage and budget controls. | | M7 Later and conditional work | Conditional | Activate routing, more ecosystems, fuzzing, configuration, forge adapters, or governance work only from demonstrated need. | Milestone-specific activation signals and stable preceding contracts. | Each item meets its own trigger and ships as a coherent validated slice without weakening core invariants. | @@ -45,7 +45,7 @@ flowchart LR - M3 is established from BL-011's real-OCR characterization of the current generic composition boundary. Direct composition is an operator-configured privileged facility, not safe author-triggered reference resolution. BL-012 remains conditional and does not block M3 or M5 when reviewed static credentials or a stdio proxy suffice. - M2 is established through independently verified stable delivery of its framework plugins, template rules, scoped evidence, deltas, and built-in MCP projection. Conditional future ecosystem packs remain in M7 and do not reopen M2. - M4 is established through independently verified v0.6.0 artifacts and later protected-target identity improvements. M5 consumes but does not reopen its policy boundary. -- M5's foundation is established by the v0.7.0 BL-023 release content; its v0.8.0 remediation/provider-neutral extension remains in progress and release-deferred until external qualification of the exact feature head. Direct provider-specific MCP enforcement is not a second M5 path: external records stay behind the broker, while generic direct MCP retains the established M3 operator boundary. Its dependency graph is exactly `M1 -> M5`, `M3 -> M5`, and `M4 -> M5`; it is not a gate for M6 or M7. The protected release workflow, immutable receipt, and independent registry/GitHub readback remain mandatory external delivery closure and are not inferred from this status update. +- M5's foundation is established by the v0.7.0 BL-023 release content; the v0.8.0 release tree completes its remediation/provider-neutral extension under an explicit owner waiver for the separate enriched OCR+LLM receipt. The waiver is a permanent evidence limitation, not a successful qualification: model-time `context_list`/`context_get`, still-present/evidence-resolved scenarios, and receipt-level raw-data leakage inspection remain unproven. Direct provider-specific MCP enforcement is not a second M5 path: external records stay behind the broker, while generic direct MCP retains the established M3 operator boundary. Its dependency graph is exactly `M1 -> M5`, `M3 -> M5`, and `M4 -> M5`; it is not a gate for M6 or M7. The protected release workflow, immutable receipt, and independent registry/GitHub readback remain mandatory external delivery closure and do not erase the waiver. - The M6 measurement-gap audit can begin from receipt v5, privacy-safe normalized token buckets, and reconciled MCP/evidence-action counts delivered in v0.7.1. BL-017 may inventory M5 receipts if they exist, but M5 does not create a second telemetry implementation or exporter. BL-016 remains parked because OCR already exposes direct run-level selection. - Versioned documentation remains a separate MCP integration: the toolkit supplies package/version evidence but does not store documentation. - Additional code-hosting adapters remain conditional and GitLab-first M5 does not depend on them. diff --git a/changelog.d/120.bugfix.md b/changelog.d/120.bugfix.md deleted file mode 100644 index 30c2461..0000000 --- a/changelog.d/120.bugfix.md +++ /dev/null @@ -1,5 +0,0 @@ -Malformed context policies, provider projections, and persisted remediation counts now fail closed at their owned contract boundaries; exclusive GitLab discussion/remediation limits and omitted reply counts now reflect only the applicable records. Operator adapters cannot request the internal remediation resource class, publishable discussion/reference text gets publication-specific DLP, and per-record text limits remain budget omissions rather than invalid-content failures. -Toolkit-generated OCR background is now qualified by the installed, preflight-supported OCR executable under `review --preview` before model execution, with the exact production refs, rules, and selection inputs. OCR remains the sole owner of its current thresholds: a recognized soft warning enters the CI log and finalized result summary, while a recognized hard character/file-size rejection produces only an identity-bound closed numeric failure summary. Unknown preview failures remain generic and fail closed; detailed evidence stays available through the built-in MCP, and explicit truncation preserves the mandatory evidence-call instruction. -Ordinary reviews now remove toolkit-generated evidence, bootstrap, protected rules, context, action receipts, and local DLP diagnostics after both OCR success and failure; only the closed static pre-execution status remains available for the posting handoff when OCR rejects input before model execution. -If OCR rejects a generated background and preview cleanup also fails, the closed OCR rejection now remains available to the static posting handoff; a cleanup-only failure still blocks model execution and publication. Provider compatibility entry points also convert impossible missing projections into explicit closed errors instead of relying on runtime assertions. -Repeated `scripts/quality.sh coverage|check` invocations now replace their own log before running, so a current result cannot include stale output from an earlier interrupted or failed invocation. diff --git a/changelog.d/120.feature.md b/changelog.d/120.feature.md deleted file mode 100644 index ac68d98..0000000 --- a/changelog.d/120.feature.md +++ /dev/null @@ -1,7 +0,0 @@ -Extends bounded review context while preserving existing policy documents: - -- **Added:** `ocr.review-context-policy/v2` accepts optional `remediation_threads`; `context_list`/`context_get` expose admitted records as opaque `remediation_thread` resources from the ephemeral `ocr.context-store/v2`. -- **Added:** the checksum-pinned GitLab example exposes `OCR_MAX_TOOLS` with default `30`, matching OCR 1.9.10, and passes it explicitly to each review so integrations can raise the per-file tool-round bound deliberately. -- **Changed:** rollout guidance separates optional `/models` metadata validation from `ocr llm test` connectivity and from a completed review, and warns that an allowed-to-fail OCR job can leave a pipeline green without usable review evidence. -- **Changed:** a remediation root now requires the authenticated live bot ID plus a valid toolkit marker/fingerprint, is excluded from generic discussion and reference projections, and always makes the review comment-only. DLP-clean metadata, generic discussions, and adapter records do not independently block automatic approval; DLP rejection and required-source degradation remain blocking. -- **Migration:** existing `ocr.review-context-policy/v1` documents remain accepted for generic discussions and references. Use policy v2 only when selecting `remediation_threads`; ephemeral stores are rebuilt per run and have no migration step. diff --git a/changelog.d/120.maintenance.md b/changelog.d/120.maintenance.md deleted file mode 100644 index 171977b..0000000 --- a/changelog.d/120.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -**Changed:** Actions storage maintenance now shards its bounded completed-run lookup by UTC day, retaining the ten-page fail-closed limit per shard. It removes completed TestPyPI preview runs after 14 days, TestPyPI development and ordinary runs after 30 days, and stable `Release` runs after 60 days; active and newer runs remain untouched. A run is no longer removed before the longer log-retention promise for its workflow. No operator migration is required. diff --git a/changelog.d/120.security.md b/changelog.d/120.security.md deleted file mode 100644 index a47fe8b..0000000 --- a/changelog.d/120.security.md +++ /dev/null @@ -1 +0,0 @@ -`ocr-ci review --preserve-private-artifacts` can retain owner-only OCR session/context state for local diagnosis without creating a posting receipt. It also writes a bounded, value-free `ocr.private-dlp-decisions/v1` sidecar with JSON path, detector subtype, size units, SHA-256, and explicit truncation counts so operators can diagnose conservative false-positive classes locally. Ordinary and validated GitLab merge-request execution never retain this attribution; the latter rejects the flag before OCR starts and keeps deterministic cleanup mandatory. diff --git a/changelog.d/123.doc.md b/changelog.d/123.doc.md deleted file mode 100644 index 51994b8..0000000 --- a/changelog.d/123.doc.md +++ /dev/null @@ -1 +0,0 @@ -**Added:** navigation-only indexes at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md` route users and maintainers to existing canonical contracts without changing their ownership. diff --git a/changelog.d/124.doc.md b/changelog.d/124.doc.md deleted file mode 100644 index 980bbbc..0000000 --- a/changelog.d/124.doc.md +++ /dev/null @@ -1,6 +0,0 @@ -Reworks the GitLab operator documentation for direct deployment: - -- **Added:** `examples/gitlab/README.md` selects identity-only, metadata, enriched-discussion, enriched-adapter, or direct-MCP operation and documents automatic-approval posture. -- **Added:** the environment reference lists every supported variable with owner, requirement, exact default, and behavior; the discussion-policy guide explains when to select generic discussions, verified remediation history, both, or adapters. -- **Added:** `examples/gitlab/accepted-decisions.md` and the later-merge-request `ocr_toolkit_evidence` `list`/`get` walkthrough show both creation and use of accepted decisions. -- **Migration:** context recipes moved from `examples/context/` to `examples/gitlab/context/` and split into `policy-discussions.json` and `policy-adapters.json`; the runtime protected-target path remains `.opencodereview/review-context-policy.json`. diff --git a/changelog.d/124.maintenance.md b/changelog.d/124.maintenance.md deleted file mode 100644 index c7b5485..0000000 --- a/changelog.d/124.maintenance.md +++ /dev/null @@ -1,6 +0,0 @@ -Removes obsolete environment and example-only configuration surface: - -- **Removed:** `OCR_GITLAB_BOT_USER_ID`; bot ID and username now come only from authenticated GitLab `GET /user`, with no replacement variable. -- **Removed:** compatibility alias `OCR_USE_ANTHROPIC`; set `OCR_LLM_PROTOCOL=anthropic`. Any presence of the removed alias now fails configuration instead of silently falling back to the default `openai` protocol. -- **Removed:** example-only `OCR_RUN_HELPER_TESTS`; run repository tests in the normal lint/test job, not the production review job. -- **Removed:** documentation-only `OCR_LLM_SUPPORTS_FUNCTION_CALLING`, `OCR_LLM_SUPPORTS_REASONING`, and `OCR_CONFIG_PATH`; these had no supported runtime semantics and have no replacement. diff --git a/changelog.d/125.feature.md b/changelog.d/125.feature.md deleted file mode 100644 index 54b7a31..0000000 --- a/changelog.d/125.feature.md +++ /dev/null @@ -1,4 +0,0 @@ -Adds live-username lifecycle commands without changing slash-command semantics: - -- **Added:** reviewer lifecycle commands accept exact whole replies `@ suppress` and `@ resolve`, using the username returned by authenticated GitLab `GET /user`. -- **Changed:** existing `/ocr suppress` and `/ocr resolve` behavior is unchanged; typo, prose, code-block, wrong-user, bot/system, `retest`, and non-toolkit-discussion replies remain non-commands, and the newest recognized human command wins. diff --git a/changelog.d/126.maintenance.md b/changelog.d/126.maintenance.md deleted file mode 100644 index 910f84b..0000000 --- a/changelog.d/126.maintenance.md +++ /dev/null @@ -1,16 +0,0 @@ -**OCR 1.9.9 — inherited** - -Toolkit 0.7.1 already qualified OCR 1.9.9. Its background-ownership and bounded main-loop diagnostic contracts remain inherited evidence; toolkit 0.8.0 does not require installing or requalifying this predecessor. - -**OCR 1.9.10 — changed** - -- **Changed:** toolkit preflight and `examples/gitlab/ocr-review.gitlab-ci.yml` now accept/pin only OCR 1.9.10 instead of 1.9.9. The Linux amd64 binary is pinned to SHA-256 `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. -- **Changed:** OCR terminal retry diagnostics are grouped by review stage. Structured `ocr.llm-retry-report/v1`, the review result, and `ocr.run-manifest/v1` remain unchanged; `ocr scan` background-wait/resume fixes and the VS Code merge-file change do not affect the toolkit's `ocr review` path. - -**Telemetry** - -The retry report remains private OCR diagnostics. Toolkit 0.8.0 does not ingest it as telemetry or use it for DLP admission, receipts, finding severity, review outcome, or automatic approval. - -**Deployment/Migration** - -Install OCR 1.9.10 directly for toolkit 0.8.0 and update the verified binary checksum. Do not install OCR 1.9.9 as an intermediate step. Any other OCR version fails toolkit preflight. diff --git a/changelog.d/127.maintenance.md b/changelog.d/127.maintenance.md deleted file mode 100644 index 32f2179..0000000 --- a/changelog.d/127.maintenance.md +++ /dev/null @@ -1,7 +0,0 @@ -**Coverage and boundary gates** - -- **Changed:** the combined branch-aware coverage floor increases from 70% to 85%. -- **Added:** CI and `scripts/quality.sh coverage`/`check` enforce four risk-group floors after the same test run: result/preflight and GitLab posting transactions at 80%; review/context/DLP/approval and MCP/provider/policy/result contracts at 85%. -- **Added:** fault tests cover bounded result and HTTP parsing, atomic replacement, GitLab read/write retry separation, exact publication and rollback identities, context admission/DLP/approval independence, and provider-neutral discussion contracts. - -No new coverage configuration format or standalone parser is introduced. Deployment agents should run the existing quality wrapper; a group failure identifies the trust boundary that needs regression coverage rather than permitting the combined percentage to mask it. diff --git a/docs/configuration.md b/docs/configuration.md index 3f93d07..d430271 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -68,7 +68,7 @@ These names belong to `examples/gitlab/ocr-review.gitlab-ci.yml`; they are shell | --- | --- | --- | --- | --- | | `OCR_VERSION` | Example pipeline | Yes | `v1.9.10` | Checksum-pinned recommended OCR binary release for toolkit 0.8.0. | | `OCR_SHA256` | Example pipeline | Yes | `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c` | Expected Linux AMD64 OCR binary digest. | -| `OCR_TOOLKIT_VERSION` | Example pipeline | Yes | `0.7.1` | Exact toolkit wheel release installed by the current published example. | +| `OCR_TOOLKIT_VERSION` | Example pipeline | Yes | `0.8.0` | Exact toolkit wheel release installed by the current published example. | | `OCR_TOOLKIT_CHECKSUMS_URL` | Example pipeline | Yes | Release URL derived from `OCR_TOOLKIT_VERSION` | Toolkit `SHA256SUMS` URL. | | `OCR_TOOLKIT_WHEEL` | Example shell | Computed | `open_code_review_toolkit-${OCR_TOOLKIT_VERSION}-py3-none-any.whl` | Exact wheel filename selected from the release. | | `OCR_TOOLKIT_WHEEL_SHA256` | Example shell | Computed | Matching value from `SHA256SUMS` | Digest checked before installing the toolkit wheel. | diff --git a/docs/engineering/execution_history/README.md b/docs/engineering/execution_history/README.md index 030e1ae..1697cca 100644 --- a/docs/engineering/execution_history/README.md +++ b/docs/engineering/execution_history/README.md @@ -6,6 +6,7 @@ | Stable tag | Primary archived plan | Related context in the same archive | | --- | --- | --- | +| `v0.8.0` | [Remediation threads, GitLab commands, and documentation](releases.md#plan-toolkit-0-8-0) | Policy-v2 verified remediation history, context-store v2, provider-neutral forge views, exact live-username commands, environment cleanup, mode-oriented examples, OCR 1.9.10, 85% coverage and risk-group gates, protected feature merge, explicit enriched-qualification waiver, and stable-delivery handoff. | | `v0.7.1` | [Bounded result semantics and OCR 1.9.9](releases.md#plan-toolkit-0-7-1) | Receipt v5, canonical publication/approval projection, reconciled count-only evidence use, privacy-safe token buckets, deterministic Recommended focus ranking, OCR 1.9.9 qualification, concurrency and hostile-read remediation, protected feature merge, and stable-delivery handoff. | | `v0.7.0` | [M5 bounded review-context enrichment](releases.md#plan-toolkit-0-7-0) | Protected policy, GitLab discussions, provider-neutral adapters, context store and handles, fixed context tools, OCR-session containment, safe-partial publication DLP, receipt v4, setup diagnostics, GitLab CI uncertainty, OCR 1.9.8 qualification, adversarial boundary remediation, and stable-delivery handoff. | | `v0.6.3` | [Context approval and GitLab write reconciliation](releases.md#plan-toolkit-0-6-3) | Bounded MR context and receipt-v3 approval, GitLab-MR external-MCP restrictions, ambiguous inline-create reconciliation, OCR 1.9.6 qualification, capped local OCR and MCP profiling, protected feature merge, and stable-delivery handoff. | diff --git a/docs/engineering/execution_history/releases.md b/docs/engineering/execution_history/releases.md index f364cbb..4632983 100644 --- a/docs/engineering/execution_history/releases.md +++ b/docs/engineering/execution_history/releases.md @@ -2,6 +2,282 @@ This archive preserves completed execution plans moved out of the active registry; the release index associates each plan with the stable tag or release cycle it supported. `PLANS.md` remains the source for active or blocked repository work; historical receipts here remain part of the audit trail. + + +## Repository-Complete Plan: v0.8.0 remediation threads, GitLab commands, and documentation + +Status: repository work complete; protected stable release and external reconciliation pending +Owner: Codex +Release classification: `release-required` +Target stable version: `0.8.0` +Last Updated: 2026-08-24 + +### Goal + +Deliver a backward-compatible, privacy-bounded remediation-thread context source, exact GitLab mention commands, a complete environment contract, mode-oriented GitLab examples, Accepted project decisions usage guidance, and navigation indexes. Integrate OCR 1.9.10 as the exact toolkit 0.8.0 target, raise meaningful boundary coverage, and take the exact final head through protected release delivery after the owner explicitly waived the remaining enriched-context qualification without treating that missing receipt as completed evidence. + +### Plan Origin + +`plan_mode_approved` + +### Requested Scope + +- Extend the protected review-context policy with optional `remediation_threads` under schema `ocr.review-context-policy/v2`; retain v1 behavior for existing enriched configurations. +- Acquire one verified toolkit-owned finding root and its admissible replies as one opaque remediation-thread record from a stable, twice-read GitLab snapshot. +- Expose remediation threads only through the local read-only context store/MCP projection, with DLP, budgets, closed state/counts, and run-local identities. +- Keep every review with admitted remediation text comment-only. Remediation prose may focus fresh inspection but cannot change severity, prove a fix, suppress a finding, resolve a thread, issue a lifecycle command, or enable approval. +- Obtain the active GitLab bot ID and username only from authenticated `GET /user` and support exact `@ suppress|resolve` replies alongside existing `/ocr` commands. +- Remove obsolete or unsupported environment semantics and publish an exact, categorized environment-variable contract including defaults. +- Reorganize GitLab examples around supported operating modes, move context recipes beneath them, and demonstrate both creation and later consumption of Accepted project decisions. +- Remove obsolete GitLab migration prose, add three navigation-only documentation indexes, and reconcile README, strategy, roadmap, and release notes. +- Create three v0.8.0 sub-issues beneath GitHub issue #120 and keep #120, its sub-issues, milestone, and Draft PR open until stable external reconciliation. +- Repair Actions storage maintenance after live run 32624698380 proved that more than ten aggregate pages of recent completed runs exceed the collector bound. Preserve a ten-page fail-closed limit per UTC day, delete completed TestPyPI preview runs after 14 days, TestPyPI development and ordinary workflow runs after 30 days, and stable Release runs after 60 days, then reconcile the current backlog without touching active or fresh runs. +- Integrate upstream OCR 1.9.10 as the only preflight-supported and example-pinned OCR version for toolkit 0.8.0 after direct source, checksum, and hosted compatibility review. Preserve OCR 1.9.9 only as the separately documented inherited predecessor already qualified for toolkit 0.7.1. +- Add risk-weighted fault tests at the existing result, preflight, GitLab transaction, context, DLP, receipt, MCP, and approval owners; fix production behavior only when a test exposes a real contract violation. +- Raise the existing combined branch-aware coverage floor from 70% to 85% and add four ordinary Coverage.py risk-group reports without a new coverage framework, configuration format, parser, or coverage-only production refactor. +- Finish each corrective cycle with a locally self-reviewed signed head and exact-head hosted CI. Retain the completed direct OCR 1.9.10 review as private remediation input; do not run the separately planned enriched-context qualification after the owner's explicit waiver, and do not represent its missing receipt as accepted evidence. + +### Requirement Traceability + +- `REQ-001` (`done`): materialized this full plan first, created the feature branch from synchronized `main`, made a signed planning commit, performed the one initial push, and opened Draft PR #122 before implementation. Covered by `WQ-01` and `WQ-02`. +- `REQ-002` (`done`): created v0.8.0 sub-issues #124, #125, and #123, attached them to #120, and appended/read back the coordination checklist without changing #120's core contract. Covered by `WQ-02`. +- `REQ-003` (`done`): implemented policy v1/v2 compatibility, a non-configurable remediation policy type, private store v2, and a fixed model-only safe remediation projection with a new closed MCP resource class. Covered by `WQ-03`. +- `REQ-004` (`done`): added a shared validated live `GET /user` identity owner and derive mutually exclusive generic discussions plus verified remediation bundles from one twice-read bounded snapshot; identity, edit, delete, reorder, and pagination drift fail closed as `mutated`. Covered by `WQ-04`. +- `REQ-005` (`done`): apply budgets and DLP before atomic storage, add MCP/bootstrap/receipt/cleanup integration, and preserve posting suppression, fingerprints, human ownership, resolve rollback, and receipt v5. Covered by `WQ-05`. +- `REQ-006` (`done`): apply DLP to every untrusted MR-derived text path, including title, description, generic discussions, remediation roots/replies, and adapter/reference content, before private-store or bootstrap admission. Keep each source's DLP admission/degradation isolated from receipt-based approval: safe non-remediation context must not block approval, DLP rejection cannot enable approval, and admitted remediation always forces comment-only. Covered by `WQ-05` and `WQ-06`. +- `REQ-007` (`done`): support exact whole-reply mention commands for the live bot username with slash-command parity and closed negative cases. Covered by `WQ-06`. +- `REQ-008` (`done`): removed `OCR_GITLAB_BOT_USER_ID`; reject `OCR_USE_ANTHROPIC` with migration guidance; removed example `OCR_RUN_HELPER_TESTS` and unsupported documentation-only variables while retaining active controls and redaction sentinels. Covered by `WQ-07`. +- `REQ-009` (`done`): published a complete environment-variable/default contract separated by runtime, GitLab predefined, example-local, and dynamic adapter inputs, protected by one exact-set/default contract test owner. Covered by `WQ-07`. +- `REQ-010` (`done`): reorganized GitLab examples by mode, relocated context recipes, removed user-facing `synthetic` labels, and demonstrated Accepted project decisions creation plus later evidence list/get use. Covered by `WQ-08`. +- `REQ-011` (`done`): removed 0.6.x migrations from `docs/gitlab.md`, documented current v1/v2 compatibility and discussion-policy selection in `docs/review-context.md`, and explained that retest requires GitLab retry UI/API or an external Note Hook receiver. Covered by `WQ-08`. +- `REQ-012` (`done`): added navigation-only managed indexes at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md`; reconciled links, README, strategy, roadmap, and Towncrier fragments. Covered by `WQ-09`. +- `REQ-013` (`done`): completed focused, adversarial, artifact, quality, secret, manifest, release-draft, reproducibility, and clean-install validation without a separate Codex Security scan or any real local LLM call. Covered by every work item and `WQ-10`. +- `REQ-014` (`done`): left implementation in Draft PR #122 through corrective review and exact-head hosted validation; the owner explicitly waived the remaining enriched-context receipt on `2026-08-24`, so lifecycle progression is no longer deferred on that evidence. Merge, publication, and closure still follow their independent protected gates. Covered by `WQ-18` and `WQ-11`. +- `REQ-015` (`done`): made the v0.8.0 release-note delta equally actionable for a production-integration agent and a human operator: categorized each outcome by effect, explicitly labelled additions, changes, removals, defaults, and migrations, and named exact public symbols and replacements. Removed environment variables have a separate `maintenance` fragment. Covered by `WQ-07` and `WQ-09`. +- `REQ-016` (`done`): made scheduled Actions maintenance tolerate more than ten aggregate recent-run pages without weakening bounded pagination, introduced conservative completed-run retention, executed one verified backlog reconciliation, and requalified hosted CI at `373fc2d`. Covered by `WQ-12`. +- `REQ-017` (`done`): integrated OCR 1.9.10 as the exact 0.8.0 target using official source, checksum, hosted compatibility, manifest/evidence, preflight, example, documentation, privacy regressions, and a maintenance-class compatibility update; kept OCR 1.9.9 separately described as the inherited 0.7.1 predecessor. Covered by `WQ-13` and `WQ-14`. +- `REQ-018` (`done`): added meaningful boundary and fault coverage for private results, preflight, GitLab reads/writes/rollback, context admission, DLP, receipts, MCP, provider neutrality, and approval without reorganizing tests or refactoring production solely for coverage. Covered by `WQ-15` and `WQ-16`. +- `REQ-019` (`done`): enforced 85% combined branch-aware coverage plus the four locked risk-group floors through the existing local and hosted workflows, published separately categorized release notes, and produced one green exact Draft head. The owner waived the additional enriched OCR qualification rather than accepting a receipt that was never produced. Covered by `WQ-17`, `WQ-18`, and `WQ-11`. + +### Explicit Non-Goals + +- Do not implement or create a future issue for `@bot retest`; the CI-only toolkit has no comment-event receiver. GitLab retry UI/API remains the no-commit mechanism. +- Do not let remediation text authorize, suppress, resolve, change severity, prove remediation, or affect automatic approval. +- Do not add arbitrary discussion search, cross-project retrieval, provider-facing model tools, write-capable MCP methods, or a second model pass. +- Do not migrate repository instruction contracts; only the three approved navigation indexes belong to this release. +- Do not modify or disclose owner-only OCR credentials or endpoint configuration, the user's unrelated `HOME` content, or start a local model peer. No further local OCR or qualification run is authorized after the owner's waiver. +- Do not run a separate Codex Security scan or disable Bandit/Gitleaks/CodeQL. Do not merge, publish stable 0.8.0, or close release issues/milestone before the independent protected lifecycle gates that own those transitions. +- Do not create a coverage framework, coverage JSON parser, or new configuration format; reorganize existing test modules for aesthetics; test unreachable lines or entrypoints merely to increase a percentage; or refactor production code solely for coverage. +- Do not install OCR 1.9.9. Its accepted evidence remains historical; only OCR 1.9.10 is the current integration target. + +### Constraints + +- The initial planning push and Draft PR already exist. Every subsequent corrective head must be signed, pushed only after its holistic self-review and local gates, and independently requalified by exact-head hosted checks before lifecycle progression. +- Each logical slice requires focused tests, full slice-diff self-review, requirement and trust-boundary reconciliation, `git diff --check`, and a signed commit. +- Apply normalization, bounds, and DLP before admitting any MR title, description, generic discussion, remediation root/reply, or dynamic adapter/reference text to the private store or bootstrap. +- Store no raw GitLab IDs, usernames, provider objects, rejected text, or source locations for rejected values in model projections, receipts, logs, or retained results. +- Keep receipt schema v5 and existing closed source/degradation accounting. +- Treat any admitted remediation bundle as mutable context and force comment-only independently of DLP outcome or semantic content. +- Hosted OCR 1.9.10 compatibility is the primary evidence. Do not download a local OCR binary unless a concrete discrepancy requires it; any optional local check is limited to a checksum-verified temporary Darwin OCR 1.9.10 `--version`, `--help`, or confirmed no-LLM behavior in an isolated temporary `HOME`, followed by removal. +- Preserve all unrelated user work and existing public posting/ownership contracts. +- Reuse pytest-cov, Coverage.py, `scripts/quality.sh`, and the compatibility workflow. Measure branches, run pytest once per full quality execution, and apply group floors through ordinary `coverage report --include=... --fail-under=...` commands. + +### Inputs And Sources + +- User-approved release plan and follow-up decisions in the active task. +- GitHub issue #120 and milestone `v0.8.0` as the product contract and coordination root. +- `AGENTS.md`, `docs/engineering/project_principles.md`, `docs/development.md`, and `docs/release.md` as repository workflow and boundary owners. +- `docs/configuration.md`, `docs/operations.md`, `docs/gitlab.md`, `docs/review-context.md`, and `docs/security.md` as public product/operator contracts. +- Existing policy/store/provider/MCP/posting implementations and their tests as compatibility baselines. +- GitLab webhook, merge-request pipeline, and retry-job documentation for the `retest` feasibility decision. +- Engineering-workflow 0.8.1 planning/index contract and its pre-edit repository audit. +- Official upstream OCR v1.9.9/v1.9.10 releases, source comparison, hosted release assets/checksums, and the repository OCR compatibility workflow as version-integration evidence. + +### User Decisions And Answers + +- Navigation-index debt is explicitly in scope because this release changes documentation; instruction-contract migration is not. +- Engineering-workflow 0.8.1 is current and requires no update. +- `OCR_GITLAB_BOT_USER_ID` and other obsolete compatibility/documentation-only variables should be removed rather than merely documented. +- The earlier unconfigured-local-OCR assumption was superseded on `2026-08-24`, and the owner-only configuration was used only for the completed private direct review. Later that day the owner explicitly waived the still-missing enriched-context qualification and prohibited another qualification run. OCR 1.9.9 stays an inherited predecessor; OCR 1.9.10 remains the exact 0.8.0 integration target. +- Mention actions use the correct spellings `suppress` and `resolve`; `supress` is ignored. +- Do not create a future `retest` issue. +- DLP must protect all untrusted MR-derived text, including title, description, every discussion class, remediation roots/replies, and dynamic adapter/reference content, without interfering with safe auto-approval; admitted remediation itself remains an independent comment-only condition. +- Provider-neutral context contracts must remain reusable for a future GitHub adapter: GitLab transport, pagination, identity, and posting stay behind GitLab modules, while the broker consumes only normalized protocols/records. +- Direct agent source review is sufficient for OCR 1.9.10; do not create a separate human-review handoff. Retry-report grouping is private terminal presentation only and must not become toolkit telemetry, receipt input, DLP input, outcome evidence, severity input, or approval signal. +- Coverage work must improve meaningful boundary confidence, not chase unreachable lines. Existing thematic test owners remain in place; a shared helper belongs in `tests/support.py` only after real reuse appears. +- Release notes must let both a production-integration agent and a human distinguish OCR 1.9.9 inherited evidence from OCR 1.9.10 changes, telemetry non-effects, required deployment/migration, coverage-gate changes, and any separately justified runtime bugfix. + +### Completed Baseline State + +- `main`, `origin/main`, and tag `v0.7.1` resolve to `42f7b9d171694b4cf3384588c941153d2e85e0f6` before branch creation. +- The working tree was clean before this plan write. +- Engineering-workflow 0.8.1 was verified as the active marketplace-managed version. +- The pre-edit workflow audit found only the three approved navigation-index gaps relevant to this release. +- GitHub issue #120 is open in the open `v0.8.0` milestone; no sub-issues existed at plan start. +- Existing policy/store schemas are v1, receipt schema is v5, and slash commands already implement newest-recognized-human-command semantics. + +### Current Work Queue + +- `WQ-01` (`done`): self-reviewed and committed this first-write plan checkpoint on `codex/v0.8.0-remediation-threads`. +- `WQ-02` (`done`): pushed only the signed planning commit, opened Draft PR #122, created and attached three milestone sub-issues, and appended/read back #120's coordination checklist. No further push is allowed until `WQ-10`. +- `WQ-03` (`done`): added policy v1/v2, remediation policy types, context-store v2, fixed model-only nested projection, `remediation_thread` MCP resource filtering, and architecture/threat-contract updates; focused tests and slice review passed. +- `WQ-04` (`done`): implemented shared validated live identity, one bounded double snapshot, root verification by live bot ID plus exact fingerprint marker, remediation grouping/generic exclusion, command exclusion, and mutation/pagination semantics; focused and adversarial tests passed. +- `WQ-05` (`done`): added provider-neutral forge origins and normalized remediation views, repeated DLP before store, provider DLP rejection accounting, one-snapshot runner composition, nested aggregate budgets, fixed bootstrap non-authority guidance, receipt-v5 comment-only semantics only for admitted remediation, metadata DLP hostile readback, and an import-boundary test; 176 focused tests plus 71 subtests, Ruff, MyPy, slice review, and diff checks passed. +- `WQ-06` (`done`): connected the exact slash/mention parser to the posting snapshot with the authenticated live username; verified `@mr.bot suppress|resolve`, newest-recognized-human precedence, toolkit-owned-root scoping, and bot/system/typo/prose/code/wrong-mention/retest negatives; 171 focused tests plus 90 subtests, Ruff, MyPy, slice review, and diff checks passed. +- `WQ-07` (`done`): removed obsolete environment and production helper-test semantics, made `OCR_USE_ANTHROPIC` fail with explicit protocol migration, published complete categorized variable/default tables, added a source/docs/example exact inventory owner, and recorded durable operator/automation release-note guidance; 354 focused tests plus 116 subtests, Ruff, MyPy, slice review, and diff checks passed; signed commit. +- `WQ-08` (`done`): added a mode matrix and focused recipes, moved and split context policies by discussion/adapter need, documented policy selection and approval effects, added an Accepted decisions creation/consumption walkthrough, removed obsolete migration prose and user-facing terminology, and passed 225 focused tests plus 26 subtests, Ruff, MyPy, slice review, and diff checks; signed commit. +- `WQ-09` (`done`): added three managed navigation indexes, reconciled cross-links/README/strategy/roadmap and public-example terminology, rendered agent/human-readable feature/maintenance/documentation Towncrier fragments, and passed 47 focused tests, Ruff, MyPy, local-link checks, Towncrier draft, the engineering-workflow 0.8.1 index audit, slice review, and diff checks; signed commit. +- `WQ-10` (`done`): holistic requirement/privacy/architecture/documentation self-review and the complete local validation matrix passed; the final signed feature push moved Draft PR #122 to exact head `a196408`, and all 13 hosted CI/security/build checks passed without corrective changes. +- `WQ-12` (`done`): diagnosed scheduled Actions maintenance run 32624698380, implemented UTC-day sharding plus TestPyPI 14-day, ordinary 30-day, and stable Release 60-day completed-run retention, reconciled the live backlog, committed and pushed the reviewed correction at `373fc2d`, and passed all 13 exact-head hosted checks. +- `WQ-13` (`done`): materialized and self-reviewed this OCR 1.9.10/coverage scope correction in a signed local planning commit; hosted `OCR compatibility` run 32648809527 qualified `v1.9.10` successfully at remote head `373fc2d` and created canonical issue #126; created coverage issue #127; attached both to #120 and milestone `v0.8.0`; updated and read back #120 coordination. No automation PR was created and no repository push occurred. +- `WQ-14` (`done`): audited the four-commit official OCR 1.9.9-to-1.9.10 source delta, GitHub asset digests, and hosted probes; integrated exact evidence/manifest, preflight, GitLab example, current docs/default tests, private retry-report non-effect regressions, maintenance-class generator output, and separate actionable OCR release notes. The scan-only and VS Code changes remain outside the review path; no automation PR existed to reconcile. +- `WQ-15` (`done`): added focused fault tests at the existing private-result, parser, preflight, GitLab transport, posting transaction, strict/non-strict, and previous-review owners; covered bounded/atomic result handling, OCR process failures, bounded retry and authenticated reads, non-retried writes, exact partial publication identities, safe error projection, and coverage-dependent cleanup. The complete `artifact -> parser -> posting -> GitLab` review found no production contract defect. +- `WQ-16` (`done`): added focused tests for `MR text -> stable snapshot -> normalization -> DLP -> budget/admission -> store/MCP -> receipt -> approval`; proved exact mixed-source counts, safe title/description/discussion/adapter auto-approval parity, remediation and required-degradation fail-closed behavior, provider-shape rejection, command exclusion, and absence of rejected/provider diagnostics. Existing hostile replay/readback, malformed policy/MCP/receipt, provider-neutral import, non-GitLab fake-provider, no-duplication, and no-remediation-reference-discovery contracts were re-run without restructuring their owners. +- `WQ-17` (`done`): raised the combined branch-aware floor to 85% and added four ordinary scoped Coverage.py reports to the same local/hosted test run; added meaningful result/preflight/GitLab/MCP fault coverage in existing thematic owners; published a separate coverage maintenance fragment; and passed the full quality, manifest, lock, Towncrier, diff, privacy, architecture, telemetry, and data-flow review without a production-code change or test-file reorganization. +- `WQ-18` (`done`): pushed the complete signed local history to Draft PR #122, verified all 13 exact-head hosted checks, and updated PR #122 plus #120 with toolkit 0.8.0, OCR 1.9.10, exact commit/tree/checksum, inherited-only OCR 1.9.9 status, and the external qualification operation. +- `WQ-11` (`done`): on `2026-08-24` the user explicitly authorized this agent to perform the qualification and continue through the full stable-release lifecycle. The first production `ocr-ci review` completed 36 of 37 selected files and returned eight candidates. Seven confirmed boundary defects were corrected with focused regressions; the receipt-class proposal was rejected because receipt v5 capability classes are intentionally fixed. The second ordinary production review completed all 38 selected items at signed head `f962d85c48e9cc081ffe47e225024d1d02162f0a` with OCR 1.9.10, `--max-tools 60`, concurrency `4`, 46 attributed evidence calls, cleanup `passed`, and no failed coverage. Its six candidates reduced to four confirmed runtime gaps, now corrected with focused regressions: TestPyPI development-run retention cannot undercut its release-log retention; operator adapters cannot request internal `remediation_thread` resources; publishable generic discussion/reference text gets publication-mode DLP; and per-record text-budget omissions remain distinct from invalid DLP rejection. Remediation-driven external reference discovery and root-only remediation admission remain rejected by the explicit locked product contract. A bounded local-only `ocr.private-dlp-decisions/v1` sidecar now attributes conservative DLP decisions by safe path, subtype, size, and digest without raw values or ordinary-CI/receipt changes. Two private historical advisory runs were inspected without transferring their identifiers or content into public artifacts: both contained OCR's soft background-size warning, while one also ended before a usable result/manifest with only a generic LLM configuration/authentication failure. Exact historical refs were then replayed through the current toolkit-owned collection/composition/bootstrap chain without an LLM; both `off` and `metadata` projections stayed naturally below the installed OCR's recommended threshold. To keep this true when supported OCR releases change their limits, toolkit 0.8.0 does not expose or hardcode OCR background thresholds. Before model execution it runs the same preflight-qualified OCR executable with the exact production refs, selection inputs, rules, and background under `review --preview`; a recognized OCR soft warning enters the bounded CI log and atomically finalized result warnings, while a recognized hard rejection stops before the model and persists only an identity-bound closed numeric failure status for static MR reporting. Unknown preview failures fail closed as generic preflight errors, and the actual review independently revalidates the same background. The complete corrective quality/security/package gates pass, and signed corrective commit `a76a790aacc3ff7d1b4bd225fbec1515caa03968` is published in Draft PR #122. The exact plan-reconciled head `c88e069f1534c41ff1e2fc05fbf9050ca95b9d5e` then passed all hosted checks with no active review thread. The owner subsequently waived the separate enriched-context `ocr-ci review` receipt and requested no qualification run. Consequently `context_list`/`context_get`, still-present/evidence-resolved behavior, and the receipt-level leakage audit are not claimed as externally qualified release evidence; this explicit waiver removes only that plan-specific gate and permits the protected lifecycle to continue. +- `WQ-19` (`done`): the user explicitly superseded the earlier no-rerun decision and authorized a locally configured exact-range OCR 1.9.10 review with `--max-tools 60`. The configured custom OpenAI-protocol gateway failed all 55 logical requests at both concurrency `4` and a diagnostic concurrency `1`, with 275 retries and only HTTP 429 rate-limit responses; this excludes tool-round exhaustion, context-size rejection, credential rejection, and toolkit execution as the failure class, so that backend will not be retried again under the two-failure rule. A materially different configured Anthropic run at concurrency `2` then completed all 43 selected files in 15m29s with zero failed/reused/waived coverage, 18 candidates, and 203 tool calls; no file exhausted its tool rounds. Future ordinary local OCR runs use concurrency `2`: four made the rate-limited failure noisier and one is unnecessarily slow. The direct OCR result is private remediation input rather than an enriched toolkit receipt because it did not run through `ocr-ci review` or exercise `context_list`/`context_get`. Static trace reduced its 18 candidates to four small confirmed correctness/maintainability defects plus one structured-rejection cleanup defect: truncate multi-command quality logs per invocation, avoid duplicate DLP encoding, replace two impossible-state runtime assertions with explicit provider errors, and preserve an in-flight OCR background rejection when preview cleanup also fails while still failing closed on cleanup-only failure. Aggregate risk-group coverage, fixed receipt classes, retention policy, minimum two-item remediation admission, strict OCR threshold comparison, root-only omission, empty normalized-text line accounting, and the remediation reply-order maximum remain intentional or already closed by stronger sequence/count invariants. Focused regressions, the full corrective-diff self-review, the canonical quality/security/package gates, and public-diff privacy review all pass; `WQ-11` records the subsequent owner waiver without claiming a separate enriched-context receipt. + +### Locked Decisions + +- Policy v2 is additive and v1 remains valid for existing enriched configurations. +- Context store moves to private schema v2; remediation records are opaque, bounded, local, read-only, and non-provider-addressable. +- Root ownership requires both live bot ID equality and a valid toolkit marker/fingerprint. +- Generic discussion and remediation projections derive from one stable double snapshot; an admitted remediation thread is excluded from generic records and from external-reference discovery. +- Mention parsing is exact whole-reply matching for the live username and shares existing slash-command lifecycle semantics. +- DLP rejection affects only the admission/degradation state of the untrusted source being inspected. It cannot turn a review into approval; safe MR metadata, generic discussions, and adapter/reference context must not themselves disable otherwise valid receipt-based auto-approval. +- Any successfully admitted remediation record forces comment-only even when its text is safe. +- The separate enriched real-path qualification is waived by the owner; its receipt is absent and must not be claimed. Stable publication remains governed by the protected feature/release PR, registry, provenance, artifact, and external-readback gates. +- Actions maintenance retains a ten-page cap per collection shard. Scheduled workflow-run acquisition uses a closed UTC-day window; completed TestPyPI preview runs are retained for 14 days, TestPyPI development and ordinary runs for 30 days, and stable Release runs for 60 days. A run is not deleted before its longer promised log-retention window. Active runs and newer completed runs are never deletion candidates. +- Generic `ocr_toolkit.context` modules must not import `providers.gitlab*`; GitLab produces the common discussion/remediation views at the composition edge. A future GitHub implementation may satisfy the same views without inheriting GitLab API or identity semantics. +- OCR 1.9.9 is an inherited predecessor qualified for toolkit 0.7.1; its evidence and historical changelog stay intact. OCR 1.9.10 is the only accepted preflight version and GitLab example pin for toolkit 0.8.0. Its Linux amd64 SHA-256 is `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. +- OCR 1.9.10 terminal retry output may group failures by review stage, while `ocr.llm-retry-report/v1`, result, and manifest contracts remain unchanged. `ocr scan` background wait/resume changes are outside the toolkit's `ocr review` path. Retry reports remain private and non-authoritative. +- Installed, preflight-qualified OCR owns its current background warning and rejection thresholds. The toolkit keeps its compact bootstrap independently bounded, exposes no threshold setting, and duplicates no OCR threshold as a runtime constant; an exact `ocr review --preview` pre-model gate classifies the generated background using the same OCR executable and production selection contract. +- Combined branch-aware coverage has an 85% floor. Risk-group floors are: `ocr_result + preflight` 80%; posting workflow + GitLab + snapshot + GitLab approval 80%; review runner + context broker/store/DLP + approval 85%; MCP config + GitLab context providers + policy/result contracts 85%. + +### Verification + +- Planning/coordination: inspect branch base, signed commit, remote Draft PR state, sub-issue parent relations, milestone assignments, and #120 checklist readback. +- Contracts/store/MCP: focused policy, store, broker, MCP, receipt, runner, posting-approval, cleanup, and installed-artifact tests with a controlled subprocess peer. +- Architecture: an import-boundary test proves generic context contracts/broker/store/MCP do not depend on GitLab provider modules; a non-GitLab fake view must project through the same remediation broker contract. +- Provider/adversarial: stable and mutated double snapshots; edit/delete/reorder/pagination drift; thread/reply/item/age/text bounds; prompt injection; Unicode, Markdown, and HTML laundering; PII/secrets across MR title, description, generic discussions, remediation roots/replies, and dynamic context; fake bot roots; system/automation events; conflicting/oversized replies. +- Commands: slash/mention parity; mixed-case username/action; whitespace boundary; typo, prose, code blocks, wrong mention, bot/system reply, and non-toolkit-owned discussion negatives; newest recognized human command wins. +- Approval safety: DLP-clean MR title/description, generic discussions, and dynamic context without admitted remediation preserve existing receipt-based auto-approval; any admitted remediation forces comment-only; a DLP-rejected source cannot enable approval; posting suppression/fingerprint/human ownership/resolve rollback remain unchanged. +- Environment/docs: exact supported variable/default inventory test; removal search for deleted names and user-facing `synthetic`; link and example checks; current schema compatibility and retest limitation documented. +- Release notes: use exact operator-facing delta labels (`Added`, `Changed`, `Removed`, `Migration`) when an objective spans multiple effects; name symbols, defaults, before/after behavior, and replacements rather than relying on a category heading. For v0.8.0, list removed environment variables in a dedicated `maintenance` fragment and categorize all other fragments by their actual user-visible effect. +- Repository gates: focused tests per slice, `git diff --check` per commit, final `scripts/quality.sh check`, `scripts/gitleaks.sh`, lock/OCR-manifest checks, Towncrier draft, reproducible packages, Twine checks, and clean installs on Python 3.12, 3.13, and 3.14. +- Hosted gates: final feature push must pass required GitHub Actions including CodeQL; no weakening or bypass. +- OCR integration: dispatch hosted `OCR compatibility` for `v1.9.10`; verify official release/source delta, Linux amd64 checksum, generated evidence, manifest/recommended/preflight/example consistency, compatibility probes, private retry-report behavior, and maintenance fragment generation. +- Result/preflight/GitLab boundaries: cover private result limits, hostile types, inode replacement, short writes/atomic cleanup, malformed or oversized JSON, stderr redaction, missing/timeout/non-zero/wrong OCR, bounded preflight reads/retries/deadlines/offline validation, GET-only retry, `Retry-After`, malformed/oversized provider responses, authenticated `/user`, ambiguous create, partial draft publish, exact transaction identities, rollback ownership, strict/non-strict failures, and previous-review preservation. +- Context/DLP/approval boundaries: verify safe MR/context approval parity; admitted-remediation comment-only; DLP/mutation/required degradation denial; optional degradation isolation; generic/remediation deduplication; no remediation reference discovery; exact mixed-source counts; no rejected text or raw identity in projections; hostile store/replay failure; provider-neutral imports/fake provider; malformed policy/MCP inputs; and impossible receipt-state rejection. +- Coverage: after one branch-aware pytest run, require combined 85% and the four locked group floors using ordinary Coverage.py include reports in both `scripts/quality.sh` and hosted test execution. +- Waived external qualification: no enriched receipt exists for OCR 1.9.10 `context_list`/`context_get`, still-present/evidence-resolved scenarios, or receipt-level raw-data leakage inspection. This is an explicit owner waiver, not a successful qualification or a replacement for the completed deterministic tests, direct OCR remediation review, hosted checks, package gates, or stable-release external readback. + +### Latest Validation Results + +- `2026-08-22`: pre-edit `git status`, `git fetch`, and revision comparison passed; local `main` equals `origin/main` at `42f7b9d` and the tree was clean. +- `2026-08-22`: engineering-workflow 0.8.1 pre-edit audit reproduced missing indexes only at `docs/README.md`, `docs/codex/README.md`, and `docs/engineering/README.md` for the approved index scope. The audit also enumerated protected/unknown repository-owned documents that will not be bulk-rewritten. +- `2026-08-22`: the planning slice passed complete diff review, requirement/trust-boundary reconciliation, required-section checks, and `git diff --check`; the planning commit is signed with the configured SSH key (local signature trust display requires an `allowedSignersFile`). +- `2026-08-22`: Draft PR #122 is open at planning head `c10fb8f`; #120 has exactly three open v0.8.0 children (#123, #124, #125) with corrected literal-safe bodies, parent links, and a read-back coordination checklist. +- `2026-08-22`: policy/store/MCP contract slice passed 44 focused tests, Ruff format/check, MyPy for the context package, full slice diff review, trust-boundary reconciliation, and `git diff --check`. Store v2 hostile-read tests reject nested DLP violations, inconsistent order/counts, raw extra fields, toolkit-bot replies, and remediation data outside its exact model-only placement. +- `2026-08-22`: GitLab acquisition/identity slice passed 225 focused provider/store/posting tests plus 78 subtests, Ruff format/check, full-package MyPy, real local TLS transport, and `git diff --check`. Tests cover live ID/username validation, stable double reads, edit/delete/reorder/pagination/identity mutation, forged roots, DLP rejection, command exclusion, bounded pagination, run-local pseudonyms, and absence of raw thread/display/path data in returned projections. +- `2026-08-22`: environment/configuration slice passed 354 focused runtime, provider, posting, OCR-compatibility, and documentation tests plus 116 subtests; the single-owner environment contract separately passed source-name inventory, categorized table/default, redaction-only, removal, and public-example checks. Ruff, MyPy, full slice diff/self-review, trust-boundary reconciliation, and `git diff --check` passed. +- `2026-08-22`: examples/public-documentation slice passed 225 integration, policy, adapter, MCP, runtime, evidence, and documentation tests plus 26 subtests. Runtime parsers validated both v2 policy recipes, stdio/remote adapter recipes, direct-MCP mode JSON, and the Accepted decisions example; documentation tests enforce the mode matrix, discussion-policy choice guide, later-MR list/get walkthrough, removed migrations, retest boundary, and absence of user-facing `synthetic` labels. Ruff, MyPy, full slice self-review, trust-boundary reconciliation, and `git diff --check` passed. +- `2026-08-22`: navigation/release-note slice passed 47 integration, documentation, release-note, and environment-contract tests. Ruff, MyPy, local Markdown target checks, and a rendered 0.8.0 Towncrier draft passed; the dedicated maintenance section enumerates every removed variable and replacement, while feature/documentation sections distinguish added, changed, and migration behavior. Engineering-workflow 0.8.1 reported all three managed indexes required, fully indexed, and error-free. Full slice self-review, provider-neutral/approval-state reconciliation, and `git diff --check` passed. +- `2026-08-22`: after the host environment limitation was removed, the canonical isolated quality environment was rebuilt with system CPython 3.14.7. `scripts/quality.sh check` passed Ruff format/check, strict MyPy, Bandit, 1,063 tests plus 203 subtests, and 82.66% coverage. The final tree retains the stronger isolated PEP 517 distribution-content test and stdlib-venv installed-artifact tests; temporary workaround commits are superseded by the restoring commit without rewriting review history. +- `2026-08-22`: `scripts/gitleaks.sh` passed with the repository-pinned Gitleaks 8.24.3 obtained only in a temporary directory from the official archive after verifying SHA-256 `b90f13bb8c90ab72083d9b0c842e39dafb82c0e5c3f872f407366b7a58909013`; no global installation changed and no findings were reported. `uv lock --check`, `scripts/ocr_compat.py validate`, the Towncrier 0.8.0 draft, and `pip-audit` also passed; pip-audit reported no known dependency vulnerabilities and only the expected local-project registry skip. +- `2026-08-22`: two clean `0.8.0.dev0` builds were byte-identical: wheel SHA-256 `11059a9a56e049fe420ac784126dfcc75b3d08d5b2470f9f53d44dfe7ea3b7eb` and sdist SHA-256 `03d18b3d8ac88294c4e542203299ffe5dc7c0d2e88e359fb26e48710681fb6cf`. Twine passed, and hash-locked wheel and sdist installs each passed `pip check`, isolated version import, `ocr-ci --version`, and `ocr-ci --help` on Python 3.12, 3.13, and 3.14. +- `2026-08-22`: holistic diff review passed requirements, privacy, architecture, documentation, omission, and trust-boundary reconciliation. Policy v1 is accepted only for published configuration compatibility while the private store has only schema v2; generic context modules do not import GitLab providers; remediation content remains model-only and comment-only; safe non-remediation MR context preserves approval eligibility; DLP rejection fails closed; exact slash/mention lifecycle parsing retains `@mr.bot resolve`; removed inputs occur only in rejection/migration/tests/history contracts. `git diff --check` passed and every feature-branch commit contains its SSH signature header (local trust display still requires an `allowedSignersFile`). No OCR binary, LLM endpoint, model peer, user `HOME`, credentials, or global OCR installation was used or changed. +- `2026-08-23`: scheduled Actions maintenance run 32624698380 failed because 1,015 completed runs inside its 44-day bounded window filled all ten 100-item aggregate pages. Manual attempt 2 on unchanged `main` head `42f7b9d` reproduced the same `workflow_runs exceeded 10 pages` failure, excluding a transient runner or network explanation. +- `2026-08-23`: the maintenance correction keeps ten pages as a fail-closed per-UTC-day bound and permits more than ten aggregate pages across the closed 74-day lookback. Tests cover 1,100 records across 11 shards, a full ten-page single-day rejection, non-overlapping run identities, exact TestPyPI/ordinary/Release retention, active-run exclusion, and elimination of redundant log deletion when a run itself is due. Focused tests, Ruff, MyPy, documentation/release-note contracts, `git diff --check`, lock/OCR-manifest checks, and Towncrier draft passed. +- `2026-08-23`: canonical CPython 3.14.7 `scripts/quality.sh check` passed 1,067 tests plus 203 subtests at 82.66% coverage, including Bandit. Checksum-verified repository-pinned Gitleaks 8.24.3 also passed without changing the global 8.30.1 installation. +- `2026-08-23`: the new code produced a read-only live plan of 697 objects, then deleted exactly 697 with zero already absent: 4 stale caches, 76 expired/old artifacts, 407 due log archives, and 210 completed runs selected by the 14/30/60-day policy. Completed-run count fell from 1,015 to 805; 80 fresh artifacts and three retained caches remained. The post-cleanup dry-run contained no run, artifact, or cache candidate; it reselected 407 log IDs only because GitHub does not expose log-archive absence and the existing 14-day idempotent retry window intentionally retries them as 404-safe candidates. +- `2026-08-23`: the signed local planning commit materialized the OCR 1.9.10 and coverage scope without a push. Hosted compatibility run 32648809527 succeeded at remote head `373fc2d`; `qualify-v1.9.10` passed and canonical issue #126 was created, while the automatic-patch/PR steps correctly remained skipped. OCR issue #126 and coverage issue #127 are open children of #120 in milestone `v0.8.0`, and #120's updated coordination block was read back. +- `2026-08-23`: direct OCR 1.9.10 review confirmed terminal-only retry grouping, scan-only background/resume changes, and an out-of-scope VS Code change; official asset metadata and hosted evidence agree on Linux amd64 SHA-256 `359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c`. Manifest validation, 411 focused tests plus 116 subtests, Ruff, and the rendered Towncrier section passed. Retry-report regressions prove private DLP sanitization leaves canonical publication/approval inputs unchanged and never publishes stage/provider/path details. +- `2026-08-23`: private-result and GitLab transaction boundary tests now cover descriptor short reads, short writes and atomic cleanup, inode replacement, hard size bounds, OCR missing/timeout/non-zero behavior, bounded and redacted preflight retries, authenticated identity/project/MR reads, bounded `Retry-After`, write non-retry, partial draft publication identities, safe parse/provider failure notes, strict/non-strict exits, and completeness-dependent prior-review cleanup. All 253 tests plus 121 subtests in the affected files, Ruff, and diff checks passed; no production defect or version-specific generic docstring was introduced. +- `2026-08-23`: context-flow regressions now prove safe MR metadata plus generic discussion/adapter data preserves approval eligibility, while admitted remediation, DLP rejection, required degradation, mutation, and impossible provider shapes remain closed and comment-only. Mixed sources produce exact closed counts, remediation commands and rejected/provider values never enter the store/receipt, and the provider-neutral `codehost` projection still crosses the common broker. The affected context matrix passed 230 tests plus 71 subtests; a full run excluding the environment-broken installed-policy venv case passed 1,113 tests plus 208 subtests at rounded 84%, with the context/approval risk group already at 85% and the policy/provider group at 82% before the final coverage slice. +- `2026-08-23`: after rebuilding only the ignored disposable quality environment on the now-available system CPython 3.14.7, the complete installed-artifact-inclusive suite passed 1,136 tests plus 275 subtests at 85.74% combined branch coverage. The four locked groups passed at 82%, 81%, 85%, and 86%; `scripts/quality.sh check` also passed Ruff format/check, strict MyPy, and Bandit. Local and hosted workflows use the same single pytest run plus four ordinary scoped reports, `uv lock --check`, OCR manifest validation, Towncrier draft, and `git diff --check` passed, and the coverage fragment describes the new gates for both deployment agents and humans. +- `2026-08-23`: the two preceding boundary-test commits were amended before publication so every newly introduced test has a concise contract docstring; all five affected test owners passed 356 tests plus 121 subtests before the history rewrite, both rewritten commits retain SSH signature headers, and generic docstrings/comments do not unnecessarily pin an OCR version. The final coverage slice likewise keeps every new test documented and leaves the thematic file layout unchanged. +- `2026-08-23`: exact-head hosted CodeQL passed its analysis job but reported one high-severity clear-text-storage alert in a test that intentionally wrote an `OCR_LLM_TOKEN` redaction sentinel to a temporary stderr artifact. Production redaction and its separate real artifact/subprocess test were unaffected. The orchestration test now receives an already redacted excerpt at the reader boundary, retains details/strict/quick-action/previous-review assertions, and no longer stores a credential-classified value or suppresses the scanner. +- `2026-08-24`: Draft PR #122 and `origin/codex/v0.8.0-remediation-threads` both resolve to signed head `6691ab56da733175fdda92502d31aab808320ec1` and tree `0c2c6ecf0f85daa7574bfe54af10fed8acb2797d`; all 13 hosted checks pass and the only review thread is resolved/outdated. The PATH-effective local OCR binary was atomically updated from 1.9.8 to official Darwin arm64 OCR 1.9.10, and size `54576370` plus SHA-256 `c626347bafcdbf25cf058af403d16568a3a9ffa1814046ff7c9d1e6becaf60d2` match the committed compatibility manifest and GitHub Release metadata. The previous 1.9.8 binary remains as an explicit local rollback copy. +- `2026-08-24`: the first authorized full production review ran checksum-verified OCR 1.9.10 with the owner-only configured LLM gateway over exact range `42f7b9d171694b4cf3384588c941153d2e85e0f6..8a00cb67bdd42144893c33879c8767d0f474e5d0`. It exited successfully with a private `partial` result: 36 of 37 selected files completed, `src/ocr_toolkit/context/broker.py` exhausted the model tool-round limit, eight findings were returned, and the toolkit evidence service handled 47 calls without persisting the configured secret. Static source/call-site validation confirms seven bounded-input/completeness defects and rejects the receipt-class proposal as inconsistent with the existing closed capability-class contract. The result remains private under `.quality-logs/`; it is qualification input, not an accepted release receipt, and requires a complete rerun after corrective work. +- `2026-08-24`: the corrective slice adds seven focused regression classes plus the requested CI tool-round and local diagnostic contracts. All 177 tests in the eight changed owners pass; the canonical isolated full gate passes 1,151 tests plus 275 subtests at 85.84% combined branch coverage, with the four locked groups at 82%, 81%, 85%, and 87%. Ruff, strict MyPy, Bandit, `git diff --check`, the rendered 0.8.0 Towncrier draft, and a complete runtime/test/documentation self-review pass. Ordinary runs retain deterministic cleanup and receipt v5; local diagnostic retention is explicitly non-posting, and the GitLab MR profile proves rejection before OCR plus session cleanup. The next accepted OCR review uses the ordinary path with `OCR_MAX_TOOLS=60` and concurrency `4`. +- `2026-08-24`: the second ordinary production review at signed head `f962d85c48e9cc081ffe47e225024d1d02162f0a` and tree `7428d36ad93bf7343cd23ba42306536ea168f3ca` passed the exact-range qualification with OCR 1.9.10: 38 selected, 38 completed, no failed or waived items, concurrency `4`, 46 verified `ocr_toolkit_evidence` calls, and successful private cleanup. The result is complete rather than partial. Its private-only DLP aggregate reflects one technical run ID in two schema locations, not repository or GitLab PII; the phone-like detector classified the identifier conservatively and both values were replaced by one stable redaction token without changing the canonical publication projection. +- `2026-08-24`: the four confirmed second-review gaps and local DLP observability gap are corrected. The sidecar has a 1,000-decision and 32-segment path bound with explicit omitted counts; rejected keys/values are identified only by bounded safe path, closed reason/subtype, size units, and digest. Focused validation passes 220 tests, Ruff, strict MyPy over 101 source files, `git diff --check`, and a targeted public-diff privacy scan. A private historical advisory-job readback confirms only a generic pre-result LLM configuration/authentication failure and allowed-to-fail green pipeline; it contains no evidence of tool-round exhaustion, token-budget stop, timeout, or a more specific credential cause, and none of its identifiers or contents enter repository artifacts. +- `2026-08-24`: holistic corrective-tree self-review closed the privacy/DLP, capability-class, retention, preview/model ordering, stale-result, static-reporting, documentation, and threshold-ownership boundaries without another finding. The final canonical quality gate passes 1,178 tests plus 277 subtests at 85.89% combined branch coverage, with the four locked groups at 83%, 81%, 85%, and 87%; Ruff, strict MyPy, and Bandit pass in the same run. Lock and OCR-manifest validation, the rendered 0.8.0 Towncrier draft, dependency audit, pinned Gitleaks 8.24.3, `git diff --check`, and public-diff privacy checks pass. Two deterministic 0.8.0 wheel/sdist builds are byte-identical, Twine and archive-content/privacy checks pass, and clean wheel plus sdist installs smoke successfully on Python 3.12, 3.13, and 3.14. The test-evidence matrix now records the installed-OCR preview owner and the bounded value-free local DLP attribution non-claim. The installed preflight-qualified OCR remains the sole owner of current background thresholds; the toolkit exposes no threshold setting and does not treat its independent compact-renderer budgets as OCR production limits. +- `2026-08-24`: the user-designated final local OCR invocation exercised the exact enriched provider fixture and OCR-owned background warning path but made no model call because its private launcher selected an unsupported gateway protocol. No qualification receipt was accepted and local OCR will not be invoked again. The failed ordinary run exposed three retained toolkit inputs; the cleanup correction now removes the complete ephemeral input/receipt/DLP set after success or failure while preserving only closed static pre-execution status. Focused tests passed 99 cases, and the canonical gate passed 1,180 tests plus 277 subtests at 85.90% combined branch coverage with risk groups at 83%, 81%, 85%, and 87%; release contracts, pinned Gitleaks, privacy review, and diff checks also passed. +- `2026-08-24`: the authorized final direct OCR review completed all 43 selected files with OCR 1.9.10, `--max-tools 60`, concurrency `2`, 18 private candidates, 203 tool calls, and no failed/reused/waived coverage or tool-round exhaustion. Static trace and holistic self-review accepted five bounded corrections and rejected the remaining candidates against stronger existing contracts. The expanded focused/documentation/release matrix passes 234 tests; the canonical gate passes 1,185 tests plus 277 subtests at 86% displayed combined branch coverage with locked groups at 83%, 81%, 85%, and 87%, plus Ruff, strict MyPy, and Bandit. Lock and OCR-manifest validation, dependency audit, pinned Gitleaks, Towncrier draft, `git diff --check`, and public-diff privacy review pass. Two explicitly versioned 0.8.0 builds are byte-identical; Twine, archive-content/privacy checks, and clean wheel/sdist install plus CLI smoke on Python 3.12, 3.13, and 3.14 pass. Signed corrective commit `a76a790aacc3ff7d1b4bd225fbec1515caa03968` is published without rewriting history; the PR remains Draft pending exact-head hosted checks and the separate enriched `ocr-ci review` receipt. +- `2026-08-24`: exact plan-reconciled head `c88e069f1534c41ff1e2fc05fbf9050ca95b9d5e` passed every hosted CI, build, dependency, secret, Bandit, and CodeQL check; the only review thread is resolved and outdated, the signed local and remote heads match, and Draft PR #122 is clean. The owner then explicitly waived the still-missing enriched-context qualification and requested no qualification run. Release progression therefore records that receipt as absent and waived, not passed. + +### Risks And Recovery + +- Risk: DLP coverage misses an MR-derived text path or becomes accidentally coupled to approval eligibility. Recovery: inventory title, description, generic discussions, remediation roots/replies, and adapter/reference inputs at their admission boundaries; keep DLP results inside per-source enrichment state; assert safe-context approval parity and separately assert admitted-remediation comment-only behavior. +- Risk: provider drift creates mixed or duplicated projections. Recovery: compare canonical complete snapshots including identity and ordering; emit only closed `mutated`, `partial`, or `unavailable` state and commit no partial store. +- Risk: marker-like user content is treated as toolkit ownership. Recovery: require active bot ID plus strict marker/fingerprint parsing and cover forged roots adversarially. +- Risk: raw provider identities leak through diagnostics or receipts. Recovery: retain run-local pseudonyms only, assert serialized artifacts/log capture, and discard rejected values without locations. +- Risk: documentation inventory drifts from runtime. Recovery: own the supported/default inventory in executable contract data and compare public tables/examples against it. +- Risk: a corrective push is treated as accepted before hosted checks bind to that exact head. Recovery: record the exact commit/tree, require all hosted checks again, and keep the PR Draft until exact-head checks and review threads are accepted. +- Risk: the waived enriched qualification leaves no external receipt for model use of `context_list`/`context_get` or its receipt-level leakage audit. Recovery: retain the waiver in the archived plan and release coordination, never claim that evidence, and reopen a separately authorized qualification or corrective release if later production evidence invalidates the deterministic contracts. +- Risk: coverage work rewards artificial tests or distorts production boundaries. Recovery: target listed fault/data-flow contracts in their existing owners, reject percentage-only entrypoint/unreachable-line work, and change production only for a demonstrated contract defect. +- Risk: OCR version prose conflates inherited 1.9.9 evidence with the 1.9.10 deployment target. Recovery: keep separate headings in compatibility docs and the OCR maintenance fragment and assert exact manifest/preflight/example defaults. +- Risk: grouped retry diagnostics leak or influence decisions. Recovery: assert the report stays in private result handling and cannot feed telemetry, DLP, receipt, severity, outcome, or approval. + +### Resume Point + +Open the exact `Release v0.8.0` PR from `release/v0.8.0`, require exact-head hosted checks and resolved review threads, then use the protected squash merge to start stable publication. Independently verify registry/workflow/Release bytes, provenance, attestations, installs, annotated tag, immutable receipt, issue receipts, issue and milestone closure, synchronized `main`, and final scratch cleanup. Do not run another local OCR qualification or claim the absent enriched receipt. + +### Plan Fidelity Check + +- [x] Every user-requested outcome has a stable `REQ-###` entry and one or more ordered work-queue owners. +- [x] Release-required implementation and release-deferred stable delivery are both explicit. +- [x] GitHub writes, push ordering, commit gates, and issue/milestone non-closure are preserved. +- [x] Full MR-text DLP coverage, auto-approval independence, comment-only remediation, identity, privacy, and mutation trust boundaries are explicit. +- [x] Local OCR/LLM qualification authorization, inherited OCR 1.9.9 evidence, exact OCR 1.9.10 target, owner-only configuration, and secret non-disclosure are explicit. +- [x] Meaningful boundary-test scope, non-overengineering limits, combined coverage, and four risk-group floors are explicit. +- [x] Validation covers functional, adversarial, artifact, documentation, release, and hosted gates. +- [x] Non-goals preserve the retest and instruction-migration decisions. +- [x] The Resume Point names the first safe unfinished action. + +### Reconciliation Check + +- [x] Draft PR and remote feature head `6691ab5`, its 13 hosted checks, issue/milestone state, review threads, workflow version, and local OCR/configuration baseline were read back before the three signed corrective commits and the final local cleanup correction. +- [x] The work queue preserves every logical slice and records the external qualification as explicitly waived rather than completed. +- [x] No existing completed work is represented as pending implementation. +- [x] No release, merge, issue closure, or external qualification is claimed complete. + +### Closure Gate + +- [x] All in-scope `REQ-###` items are `done`; `WQ-11` records the owner waiver and does not claim a qualification receipt. +- [x] Each new logical slice has focused test evidence, full diff self-review, boundary reconciliation, `git diff --check`, and a signed commit. +- [x] Holistic privacy, architecture, requirements, telemetry, data-flow, documentation, and omission review is complete with no unresolved findings. +- [x] The final local validation matrix and hosted CI are green for exact reviewed feature head `e2c5b847a3884edeeeb24123412af51b280faf14`; protected merge `ff540214a93e184ccba11f4f11f1b0153619bc57` preserves its reviewed tree. +- [x] `PLANS.md`, roadmap/strategy, generated Towncrier changelog, issues, milestone, and remote refs agree that implementation is complete and protected release delivery is active with the enriched receipt explicitly waived. +- [x] Plan lifecycle validation succeeds for the repository-complete release checkpoint. + +### Post-Close Delivery + +- Feature PR #122 and its exact-tree protected merge are complete. TestPyPI development run 32724113797 and independent bytes/provenance/install readback are complete. +- The user waived the remaining enriched qualification on `2026-08-24`; no receipt is accepted or claimed. Release-PR merge, stable publication, immutable external readback, and issue/milestone closure remain separately gated lifecycle states. +- If external evidence invalidates an assumption, reopen active corrective work rather than rewriting completed validation history. + +### Handoff Notes + +- Do not push implementation commits individually. Keep all new slices local until `WQ-17` is complete; push once at `WQ-18`. +- Do not start another local OCR or enriched qualification run. Keep owner-only OCR configuration, private results, and endpoint/model/token details out of tracked history and public release surfaces. +- Keep OCR 1.9.9 inherited and OCR 1.9.10 changed/deployed text separate in evidence, docs, changelog, PR, and #120. +- Keep #120's existing core body and explicit non-goals intact; append coordination only and track mention behavior in its own child issue. +- When resuming after interruption or compaction, read this plan, inspect `git status` and local/remote commit graphs, reconcile requirement/queue states, and continue from the first non-terminal queue item. + +### Repository-complete release checkpoint + +- Feature PR [#122](https://github.com/xeonvs/open-code-review-toolkit/pull/122) passed all checks at reviewed head `e2c5b847a3884edeeeb24123412af51b280faf14` and was squash-merged as `ff540214a93e184ccba11f4f11f1b0153619bc57`; the merge tree equals reviewed feature tree `cec4be33c6fff27de93fded041cde06a798d1ca7`. +- TestPyPI development run [32724113797](https://github.com/xeonvs/open-code-review-toolkit/actions/runs/32724113797) published `0.7.2.dev66`. Independent readback matched the workflow wheel SHA-256 `9f13dabc12860442722f1109b8eeeb85804901ddcad5e3d74a5096b9d4b67a34` and sdist SHA-256 `1d4dc6dfc9b4b4a311eb6043a5b671103122bc7e6b8ebaae85ddc466ded3f07f`, verified the exact PEP 740 publisher and subjects, and clean-installed both artifacts with CLI smoke. +- The release PR is the final repository mutation. It sets `.release-version=0.8.0`, `.next-version=0.8.1`, deterministic source epoch `1787572363` (one second after the feature squash merge), exact sorted issues `[120, 123, 124, 125, 126, 127]`, generated Towncrier notes, stable example pins, and reconciled roadmap/strategy/documentation truth; `PLANS.md` is reset. +- Release-candidate validation passes 95 focused release/documentation tests and the canonical 1,185-test plus 277-subtest quality gate at 85.91% branch coverage, with locked risk groups at 83%, 81%, 85%, and 87%; Ruff, strict MyPy, Bandit, lock, OCR-manifest, dependency-audit, release-note, Twine, archive-content/privacy, and diff checks pass. Two deterministic 0.8.0 builds are byte-identical with wheel SHA-256 `1b7caba9bc74ee7643ee344bb5bec949a1f02fe1a7f9189de08f971a409dd620` and sdist SHA-256 `9757cc4f5677e6f366458c6248cf72df8979072ed69264022224998e786725c4`; clean wheel and sdist install plus CLI smoke pass on Python 3.12, 3.13, and 3.14. +- The owner's waiver remains explicit: no enriched OCR+LLM receipt proves model-time `context_list`/`context_get`, still-present/evidence-resolved scenarios, or receipt-level raw-data leakage inspection. Stable publication and external readback do not replace that absent qualification. +- Stable TestPyPI/PyPI bytes, GitHub attestations, registry provenance, annotated `v0.8.0` tag, immutable GitHub Release and assets, `release-receipt.json`, supported-Python registry installs, Actions-owned issue receipts, issue and milestone closure, and final clean-main synchronization are not claimed by this repository checkpoint and remain post-merge external gates. + + ## Repository-Complete Plan: v0.7.1 bounded result semantics and OCR 1.9.9 diff --git a/docs/engineering/toolkit_strategy.md b/docs/engineering/toolkit_strategy.md index 0fbf112..6f1c415 100644 --- a/docs/engineering/toolkit_strategy.md +++ b/docs/engineering/toolkit_strategy.md @@ -113,7 +113,7 @@ Safe direct composition is therefore limited to reviewed narrow read-only tools, ## Bounded review-context enrichment -M5's foundation is established in v0.7.0. It extends the v0.6.3 selection/approval foundation with protected-target policy, stable GitLab discussions, deterministic references, provider-neutral adapters, a separate private context store, opaque handles, fixed `context_list`/`context_get`, isolated OCR sessions, publication DLP, receipt v4, and closed setup/CI-uncertainty outcomes. Receipt v5 in v0.7.1 supersedes the result/posting contract without changing the established acquisition boundary. The v0.8.0 extension is in progress until exact-head external qualification: it adds policy v2 remediation selection, private context-store v2, authenticated toolkit-root ownership, fixed remediation projections, live-username mention commands, and explicit provider-neutral forge views. It extends bounded invocation evidence without reopening M1/M4 or creating a second review engine. The protected release workflow and independent registry/GitHub readback remain the external delivery proof; strategy prose does not substitute for them. +M5's foundation is established in v0.7.0. It extends the v0.6.3 selection/approval foundation with protected-target policy, stable GitLab discussions, deterministic references, provider-neutral adapters, a separate private context store, opaque handles, fixed `context_list`/`context_get`, isolated OCR sessions, publication DLP, receipt v4, and closed setup/CI-uncertainty outcomes. Receipt v5 in v0.7.1 supersedes the result/posting contract without changing the established acquisition boundary. The v0.8.0 release tree adds policy v2 remediation selection, private context-store v2, authenticated toolkit-root ownership, fixed remediation projections, live-username mention commands, and explicit provider-neutral forge views. It extends bounded invocation evidence without reopening M1/M4 or creating a second review engine. The owner waived the separate enriched OCR+LLM qualification: no receipt proves model-time `context_list`/`context_get`, still-present/evidence-resolved scenarios, or receipt-level raw provider-data leakage inspection. The protected release workflow and independent registry/GitHub readback remain mandatory delivery proof but do not substitute for that absent qualification. The target architecture acquires forge discussion snapshots and deterministic reference candidates before OCR. An immutable `.opencodereview/review-context-policy.json` read only from the captured protected-target SHA independently controls admission, retrieval, model egress, publication, and retention. Recognizers produce candidates but never authorize them. A provider adapter must authorize the exact tenant, canonical object, fields, and operation, retrieve a bounded version-bound projection, apply normalization and DLP, and atomically commit it to a run-local context store before an opaque unguessable handle is minted. Handles bind run, adapter, tenant, canonical object, projection, version or digest, policy version, expiry, and stored record without exposing the upstream identifier. diff --git a/examples/gitlab/ocr-review.gitlab-ci.yml b/examples/gitlab/ocr-review.gitlab-ci.yml index 2afb415..78cb347 100644 --- a/examples/gitlab/ocr-review.gitlab-ci.yml +++ b/examples/gitlab/ocr-review.gitlab-ci.yml @@ -7,7 +7,7 @@ default: variables: OCR_VERSION: "v1.9.10" - OCR_TOOLKIT_VERSION: "0.7.1" + OCR_TOOLKIT_VERSION: "0.8.0" OCR_TOOLKIT_CHECKSUMS_URL: "https://github.com/xeonvs/open-code-review-toolkit/releases/download/v${OCR_TOOLKIT_VERSION}/SHA256SUMS" OCR_SHA256: "359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c" OCR_POST_MODE: "draft" diff --git a/tests/test_environment_contract.py b/tests/test_environment_contract.py index c2e05c4..ccee26e 100644 --- a/tests/test_environment_contract.py +++ b/tests/test_environment_contract.py @@ -16,6 +16,8 @@ from ocr_toolkit.posting import settings from tests.support import PROJECT_ROOT +STABLE_TOOLKIT_VERSION = (PROJECT_ROOT / ".release-version").read_text(encoding="utf-8").strip() + RUNTIME_DEFAULTS = { "OCR_LLM_URL": "None", "OCR_LLM_TOKEN": "None", @@ -67,7 +69,7 @@ EXAMPLE_DEFAULTS = { "OCR_VERSION": "v1.9.10", "OCR_SHA256": "359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c", - "OCR_TOOLKIT_VERSION": "0.7.1", + "OCR_TOOLKIT_VERSION": STABLE_TOOLKIT_VERSION, "OCR_TOOLKIT_CHECKSUMS_URL": "Release URL derived from `OCR_TOOLKIT_VERSION`", "OCR_TOOLKIT_WHEEL": "open_code_review_toolkit-${OCR_TOOLKIT_VERSION}-py3-none-any.whl", "OCR_TOOLKIT_WHEEL_SHA256": "Matching value from `SHA256SUMS`", @@ -260,7 +262,7 @@ def test_example_local_defaults_match_the_pipeline() -> None: for name, value in { "OCR_VERSION": "v1.9.10", "OCR_SHA256": EXAMPLE_DEFAULTS["OCR_SHA256"], - "OCR_TOOLKIT_VERSION": "0.7.1", + "OCR_TOOLKIT_VERSION": STABLE_TOOLKIT_VERSION, "OCR_MAX_TOOLS": "30", "OCR_MAX_TOKENS_BUDGET": "0", }.items(): diff --git a/tests/test_integration_contracts.py b/tests/test_integration_contracts.py index 28aed13..87b3805 100644 --- a/tests/test_integration_contracts.py +++ b/tests/test_integration_contracts.py @@ -299,10 +299,11 @@ def test_public_docs_describe_the_established_m5_boundary() -> None: assert "receipt v5" in document assert "review-context.md" in document assert "M5's foundation is established in v0.7.0" in strategy - assert "M5 Bounded review-context enrichment
established / in progress" in roadmap + assert "M5 Bounded review-context enrichment
established" in roadmap assert "DLP-clean metadata, generic discussions, and adapter records" in strategy - assert "v0.8.0 remediation/provider-neutral extension remains in progress" in roadmap - assert "release-deferred until external qualification" in roadmap + assert "v0.8.0 release tree completes its remediation/provider-neutral extension" in roadmap + assert "explicit owner waiver for the separate enriched OCR+LLM receipt" in roadmap + assert "still-present/evidence-resolved scenarios" in roadmap assert "protected release workflow" in roadmap assert "independent registry/GitHub readback" in roadmap assert "complete BL-023 broker remains planned" not in roadmap diff --git a/tests/test_release_notes.py b/tests/test_release_notes.py index 7b69834..f9785ac 100644 --- a/tests/test_release_notes.py +++ b/tests/test_release_notes.py @@ -46,17 +46,12 @@ def test_towncrier_categories_preserve_conditional_release_contract() -> None: } -def test_080_fragments_are_actionable_for_operators_and_automation() -> None: - feature = (ROOT / "changelog.d" / "120.feature.md").read_text(encoding="utf-8") - mention = (ROOT / "changelog.d" / "125.feature.md").read_text(encoding="utf-8") - maintenance = (ROOT / "changelog.d" / "124.maintenance.md").read_text(encoding="utf-8") - actions_maintenance = (ROOT / "changelog.d" / "120.maintenance.md").read_text(encoding="utf-8") - examples = (ROOT / "changelog.d" / "124.doc.md").read_text(encoding="utf-8") - navigation = (ROOT / "changelog.d" / "123.doc.md").read_text(encoding="utf-8") - ocr_maintenance = (ROOT / "changelog.d" / "126.maintenance.md").read_text(encoding="utf-8") +def test_080_release_notes_are_actionable_for_operators_and_automation() -> None: + changelog = (ROOT / "CHANGELOG.md").read_text(encoding="utf-8") + notes = release.release_notes(changelog, "0.8.0") for label in ("**Added:**", "**Changed:**", "**Migration:**"): - assert label in feature + assert label in notes for contract in ( "ocr.review-context-policy/v1", "ocr.review-context-policy/v2", @@ -65,11 +60,11 @@ def test_080_fragments_are_actionable_for_operators_and_automation() -> None: "remediation_thread", "DLP-clean metadata, generic discussions, and adapter records", ): - assert contract in feature + assert contract in notes - assert "@ suppress" in mention - assert "@ resolve" in mention - assert "GitLab `GET /user`" in mention + assert "@ suppress" in notes + assert "@ resolve" in notes + assert "GitLab `GET /user`" in notes for removed_name in ( "OCR_GITLAB_BOT_USER_ID", @@ -79,25 +74,25 @@ def test_080_fragments_are_actionable_for_operators_and_automation() -> None: "OCR_LLM_SUPPORTS_REASONING", "OCR_CONFIG_PATH", ): - assert removed_name in maintenance - assert maintenance.count("**Removed:**") == 4 - assert "OCR_LLM_PROTOCOL=anthropic" in maintenance - assert "default `openai`" in maintenance + assert removed_name in notes + assert notes.count("**Removed:**") == 4 + assert "OCR_LLM_PROTOCOL=anthropic" in notes + assert "default `openai`" in notes - assert "ten-page fail-closed limit per shard" in actions_maintenance + assert "ten-page fail-closed limit per shard" in notes for retention in ( "TestPyPI preview runs after 14 days", "TestPyPI development and ordinary runs after 30 days", "stable `Release` runs after 60 days", ): - assert retention in actions_maintenance - assert "active and newer runs remain untouched" in actions_maintenance + assert retention in notes + assert "active and newer runs remain untouched" in notes - assert "examples/context/" in examples - assert "examples/gitlab/context/" in examples - assert ".opencodereview/review-context-policy.json" in examples + assert "examples/context/" in notes + assert "examples/gitlab/context/" in notes + assert ".opencodereview/review-context-policy.json" in notes for path in ("docs/README.md", "docs/codex/README.md", "docs/engineering/README.md"): - assert path in navigation + assert path in notes for heading in ( "OCR 1.9.9 — inherited", @@ -105,7 +100,7 @@ def test_080_fragments_are_actionable_for_operators_and_automation() -> None: "Telemetry", "Deployment/Migration", ): - assert heading in ocr_maintenance + assert heading in notes for contract in ( "toolkit 0.8.0 does not require installing or requalifying this predecessor", "ocr.llm-retry-report/v1", @@ -115,7 +110,7 @@ def test_080_fragments_are_actionable_for_operators_and_automation() -> None: "Do not install OCR 1.9.9 as an intermediate step", "359e5bafda1438a47ef389399f4994350e1016371eac1dc17a2c428acb228e6c", ): - assert contract in ocr_maintenance + assert contract in notes def test_extracts_only_the_exact_release_section() -> None: