Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,26 @@ node install.mjs --target /path/to/host-repo
- `evidence-bundle`: `ffmpeg` (webm→mp4) and `zip` on PATH.
- Local review runner: Node.js 20+ and Git. Acceptance tests also need Python 3. Optional model review: authenticated Codex or Claude CLI. Generic check execution: Docker. OpenELIS execution: Lima 2+, virtualization and sufficient build resources.

## Native gh stack reviews

Use a checkout already managed by `gh stack`. The harness reads the published
stack without checking out, rebasing, pushing or merging its branches:

```sh
node review/cli.mjs plan --stack --repo /path/to/feature-checkout --level L2 --out /path/to/evidence/stack-plan.json
node review/cli.mjs run --plan /path/to/evidence/stack-plan.json --out /path/to/evidence/runs
```

This reviews shared design, each PR's own diff, and combined behavior with one
reviewer. Level, provider/model and execution settings remain independent.
Use `--stack-layer PR_NUMBER` for a specific intermediate candidate and
`--previous-stack OLD_PLAN` when reassessing a restacked series. See the
[native stack guide](docs/stack-review.md) for evidence scope and supported limits.

## License
MIT — see [LICENSE](LICENSE).

## Local review harness (v0.5)
## Local review harness (v0.6)

Review an existing PR without checking it out in an application worktree:

Expand Down
7 changes: 7 additions & 0 deletions docs/ogc-1560-review-harness/implementation-status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Implementation and validation

## Version 0.6 follow-up — 1 November 2026: campaign reporting

Native stack reviews now constrain generated coverage IDs to the selected layers, and distinguish visible out-of-scope notes from actual missing evidence. Source preparation detects missing Git objects before the reviewer starts and retains the failing stage plus sanitized Git diagnostics. The regression suite has 95 passing tests and all seven skills validate; see [validation-v09.json](validation-v09.json) for the live adapter result. A fresh low-effort Sol L2 review of the four-PR installation stack and its pinned distribution completed with 79 source inspections, valid coverage IDs, visible scope notes and no actionable findings.

The harness supports L1–L5 and native stack coordination, but its eight PRs remain unmerged drafts. Independent held-out quality adjudication and unattended public-fork deployment acceptance remain open in the [roadmap](roadmap.md). Hosted native-stack dispatch and automatic per-layer execution scheduling are separate extensions. Earlier source-review campaigns do not establish L3–L5 acceptance of the analyzer/security changes.


## Version 0.5 — 30 October 2026: implemented methods and explicit acceptance limits

The current implementation supports evidence-based L1–L5, isolated test/probe execution, loaded-runtime verification, rendered product/design comparisons, Codex and Claude source review, managed-result exchange, explicit publication, and paired quality evaluation. Use the [execution guide](execution-guide.md), [evaluation guide](evaluation-guide.md), and [OpenELIS preparation profile](../../examples/openelis/REVIEW.md). The [checklist](roadmap.md) and [current evidence record](validation-v07.json) distinguish implemented tooling from independent quality acceptance. Entries below are historical.
Expand Down
61 changes: 58 additions & 3 deletions docs/ogc-1560-review-harness/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Updated 30 October 2026. This is the implementation roadmap following the requirements audit of code-qa v0.3 at `853a24d557cc451bce89ca8743fcf52a807de6fb`.

**Implementation status: Stages 1–5 are implemented in v0.5. The current stack is PRs #1, #2, #4–#8; nothing is merged.** Controlled execution and adapter evidence are recorded in [validation-v07.json](validation-v07.json). Independent quality acceptance is still open: provisional labels are not ground truth, and the held-out evaluation has not run. Public-fork automation is not enabled.
**Implementation status: Stages 1–5 execution capabilities shipped in v0.5. Native gh stack coordination is tracked separately below for v0.6; the original G06 completion claim overstated snapshot attachment support. The implementation remains on the unmerged code-qa stack.** Controlled execution and adapter evidence are recorded in [validation-v07.json](validation-v07.json). Independent quality acceptance is still open: provisional labels are not ground truth, and the held-out evaluation has not run. Public-fork automation is not enabled.

This checklist supersedes the earlier milestone sequence and the interpretation of L1–L5 as effort presets. See the [specification](specification.md), [goals](goals.md), [historical implementation evidence](implementation-status.md), and [20-gap audit](gap-inventory.json). Gap IDs below are stable links to that audit.

Expand Down Expand Up @@ -101,8 +101,8 @@ Scope is independent of level. L1 may execute existing deterministic probes; L2

### G06 — Review the assembled stack and both sides of contracts

- [x] Represent ordered PR stacks, dependency revisions and the assembled candidate.
- [x] **Acceptance:** Resolve ordered stack/dependency revisions and the assembled state without merging upstream. Compare emitted and consumed contracts and relevant configuration. A fixture with two individually passing layers that fail together must be detected and attributed to the owning layer. Report stale ancestry/pins separately from code findings.
- [x] Attach pinned dependency/consumer snapshots and an explicitly chosen candidate (v0.5). Native stack topology, actual layer diff ranges and restack-aware collection are delivered in Stage 6 below.
- [x] **Acceptance (completed by Stage 6):** Resolve ordered stack/dependency revisions and the assembled state without merging upstream. Compare emitted and consumed contracts and relevant configuration. A fixture with two individually passing layers that fail together must be detected and attributed to the owning layer. Report stale ancestry/pins separately from code findings.

### G07 — Connect test adequacy and test-layer choice to the runner

Expand Down Expand Up @@ -244,3 +244,58 @@ Primary sources:
- [GitHub — safe pull_request_target use](https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target)

The [research record](research-and-validation.md) documents reference implementation defects we must not copy. Current and original evidence for each gap is in [gap-inventory.json](gap-inventory.json).

## Stage 6 — Native gh stack coordination (v0.6)

The earlier G06 implementation exposed attached revisions as snapshots, not true
layer diff ranges. This stage corrects that gap and makes native stacks an
explicit application of the existing runner. See [usage and boundaries](../stack-review.md).

- [x] **S01 — Collect the native stack.** Use `gh stack view --json`, refresh each
published PR, pin order/base/head/merge-base and refuse mixed or moving graphs.
Acceptance: real Git fixtures preserve checkout state and reject unpublished,
mismatched or reordered PRs. No review action rebases, submits or merges.
- [x] **S02 — Expose layer and combined diffs.** Reviewer sources include primary
trunk-to-top and every pr-N range. Acceptance: lower/upper diffs contain only
their respective changes, the combined diff contains both, and base-side
quotations resolve to the correct revision.
- [x] **S03 — Distinguish freshness and ancestry.** Check every PR and topology at
collection and execution; report missing current parents separately.
Acceptance: changed lower heads stop execution before AI; stable but unrestacked
children produce partial results, including L1.
- [x] **S04 — Require explicit stack review scope.** Shared procedure covers
design, each layer, contracts, duplication and combined result. Acceptance:
a clean label missing one layer is partial; model/provider remain independent.
- [x] **S05 — Scope execution to its candidate.** Combined L1 checks every layer;
`--stack-layer` supports intermediate build/test/runtime plans. Acceptance:
a fixture passes at the top and fails at a selected earlier head; the report
never promotes combined tests into prefix evidence.
- [x] **S06 — Reassess restacked work.** Prior plans expose old layer ranges,
changed parents and human-readable range-diff; history remains evidence-backed.
Acceptance: an unchanged child patch on a changed parent remains visible for
reassessment; old runtime results are not automatically reused.
- [x] **S07 — Attribute and publish to the owning PR.** One owning current source
per actionable finding; publication checks the whole stack and targets the
owner's commit. Acceptance: lower-layer finding targets lower head; movement
elsewhere prevents posting; no automatic review-thread resolution.
- [x] **S08 — Validate the live interface.** Collect a real native stack and
execute L1 with zero model calls; retain its plan/report. Run all tests and
skill lint. Delivery uses gh stack submit and current PR checks; no upstream merge.

Further work is deliberately separate: independently measured AI review quality,
a hosted native-stack checkout workflow, and automated per-layer execution
scheduling. Current CLI selection and explicit checks support manual campaigns.

Stage 6 evidence: [validation-v08.json](validation-v08.json). The first real
reviewer attempt exposed a history/thread-ID ambiguity and was rejected; the
corrected retry completed. This validates coordination and source-review transport,
not independent security acceptance or model quality.


## Campaign reporting follow-up — 1 November 2026

- [x] Separate out-of-scope notes from missing required evidence. Acceptance: an L2 source review can complete with a visible runtime disclaimer; missing consumers, unresolved questions and explicit partial reports remain incomplete. Higher-level evidence requirements are unchanged.
- [x] Constrain generated stack coverage IDs. Acceptance: combined and selected-layer schemas reject an attached distribution ID, while the consumer assessment preserves its source trace. Missing layers still prevent completion.
- [x] Preflight pinned source objects and retain useful errors. Acceptance: a real partial clone stops before AI without an implicit remote fetch, then succeeds after explicit source acquisition; retained diagnostics identify the stage and redact URL credentials.

Validation and the live adapter result are recorded in [validation-v09.json](validation-v09.json). These repairs do not retroactively upgrade earlier partial reports or establish independent review quality.
85 changes: 85 additions & 0 deletions docs/ogc-1560-review-harness/validation-v08.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"date": "2026-10-30",
"version": "0.6.0",
"scope": "Native gh stack coordination; not full security clearance or independently measured reviewer quality",
"automated": {
"suite": "npm test",
"tests": 91,
"failed": 0,
"modelCalls": 0,
"skillLint": "7 skills valid"
},
"nativeStack": {
"repository": "DIGI-UW/OpenELIS-Global-2",
"prs": [
4851,
4854,
4875,
4890
],
"candidate": "b12b213b6f2a4e4db930d5e704d961349e4cc5a5",
"level": "L1",
"status": "complete",
"assessment": "no_findings",
"checks": [
{
"id": "whitespace",
"status": "pass"
},
{
"id": "pr-4851-whitespace",
"status": "pass"
},
{
"id": "pr-4854-whitespace",
"status": "pass"
},
{
"id": "pr-4875-whitespace",
"status": "pass"
},
{
"id": "pr-4890-whitespace",
"status": "pass"
}
],
"modelCalls": 0
},
"reviewerSmoke": {
"selection": "pr-4875",
"head": "ee7fb0efad3a9128258997ea82e07ded6ee37934",
"level": "L2",
"model": "gpt-6.1-sol",
"reasoning": "low",
"sessionLimit": 1,
"seconds": 120,
"firstAttempt": "Rejected because the model used a GitHub comment ID as harness history. Schema and instructions now restrict priorFindings to supplied history.",
"retry": {
"status": "complete",
"assessment": "findings",
"inspections": 19,
"coverage": [
{
"id": "design",
"status": "assessed",
"reason": "Selected-layer design preserves configuration metadata in shared cleanup and gives barcode fixtures transactional ownership without changing production responsibilities."
},
{
"id": "pr-4875",
"status": "assessed",
"reason": "Reviewed all three changed files and relevant unchanged configuration callers, controller behavior, and fixture-loading implementation. Other stack layers are outside this selected-layer review."
}
],
"findings": 1
},
"adjudication": "Returned an existing low-priority fixture-style concern. Not treated as a new verified security defect. Nothing published.",
"followup": "Added existing-thread identity and no-duplicate-publication regression coverage after this smoke; that final clarification is unit-tested, not another paid review."
},
"notEstablished": [
"Full security-stack acceptance",
"Intermediate runtime acceptance beyond supplied synthetic regression",
"Held-out independent reviewer quality"
],
"applicationChanges": false,
"merged": false
}
51 changes: 51 additions & 0 deletions docs/ogc-1560-review-harness/validation-v09.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"date": "2026-11-01",
"scope": "Native stack campaign reporting follow-up",
"automated": {
"tests": 95,
"passed": 95,
"failed": 0,
"skillsValidated": 7,
"focusedFinalSourceStackTests": 15
},
"regressions": [
"Out-of-scope L2 notes stay visible without clearing missing consumers or explicit omissions",
"Generated combined and selected-layer schemas reject attached consumers as stack layers",
"Partial clone fails before AI without implicit object acquisition and succeeds after explicit materialization",
"Git failure stage and diagnostic retained with URL userinfo and query redaction"
],
"live": {
"runId": "8281db55-5d1d-4081-b446-9e626ae2df85",
"level": "L2",
"model": "gpt-6.1-sol",
"reasoningEffort": "low",
"head": "826d270bc1fd41cf345f458a337d4c297c98ee33",
"status": "complete",
"assessment": "no_findings",
"sourceInspections": 79,
"stackPRs": [
4851,
4854,
4875,
4890
],
"consumer": "8ffce45b6f716baba53d387784210c971b29cba3",
"coverageIds": [
"design",
"pr-4851",
"pr-4854",
"pr-4875",
"pr-4890",
"combined"
],
"scopeNotes": [
"Runtime tests and CI acceptance were not performed in this source review. Publication and merge acceptance were not assessed."
],
"artifactDirectory": "/Users/pmanko/.codex/visualizations/2026/10/22/01a16543-82e0-7360-9587-a838bf3839a7/harness-reporting-fix/runs/8281db55-5d1d-4081-b446-9e626ae2df85"
},
"limits": [
"No source-review result establishes application runtime, CI or merge acceptance.",
"Old partial campaign records remain unchanged.",
"One live adapter run and deterministic regressions do not establish independent review accuracy."
]
}
6 changes: 6 additions & 0 deletions docs/review-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ into dollars. L1 is the default; legacy rigor aliases select L1/L3, with the sam

A source-only L2 review does not claim runtime acceptance. Missing necessary context,
unassessed areas or unanswered verification questions yield partial/undetermined.
Reports put work outside the selected level in `scopeNotes`, rendered as “Outside this review.” Reading tests at L2 does not claim their execution; an unselected runtime test is not itself a source-coverage omission. Missing necessary source or an unanswered in-scope question remains partial. Explicit partial reports are never silently upgraded.
The area rationales are model judgments, not independently validated factual proof.
Large files are not rejected before review.

Expand Down Expand Up @@ -182,6 +183,7 @@ Codex and Claude receive pinned source through a read-only operation broker, wit
## Reports and exit codes

Each run retains `plan.json`, `packet.json`, `result.json`, `report.md` and logs.
Source preparation checks for missing Git objects without fetching from a promisor remote. If objects are missing, explicitly materialize the pinned trees in the source checkout and create a new run. Preparation failures retain their stage and sanitized Git diagnostic in `reviewer/repository-error.txt` (or the attached source subdirectory); no AI review starts for an unavailable snapshot.
The report shows scope, level, model/limits, executed assertions, evidence-linked
findings, dispositions, counterevidence, area assessments, unanswered questions, omissions and cleanup. Source quotes, including those from unchanged files discovered during review, are
checked against exact committed lines and retained in `packet.json`. Unread source
Expand All @@ -208,3 +210,7 @@ The implemented CLI includes Codex/Claude adapters, external-result import, expl
Adapter references: [Codex developer commands](https://learn.chatgpt.com/docs/developer-commands),
[configuration](https://learn.chatgpt.com/docs/config-file/config-reference),
and [Lima configuration](https://lima-vm.io/docs/config/).

## Native gh stacks

Use `plan/review --stack --repo CHECKOUT` for first-class stack collection, layer and combined diff inspection, explicit coverage, and owning-PR findings. `--stack-layer NUMBER` selects an intermediate candidate; `--previous-stack PLAN` adds the previous ranges and parent comparisons. See [the native stack guide](stack-review.md). The hosted workflow remains single-PR.
Loading
Loading