Skip to content

feat(quad-cli): record declared vs effective reviewers and add a live smoke preflight - #16

Merged
drvoss merged 1 commit into
mainfrom
feat/quad-cli-observability
Aug 27, 2026
Merged

drvoss merged 1 commit into
mainfrom
feat/quad-cli-observability

Conversation

@drvoss

@drvoss drvoss commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Symptom

The final report records reviewers_effective — a single number. It does not record which
reviewer dropped out, at which stage, or why.

Reproduction

With stub CLIs (QUAD_CLI_MOCK_DIR), declare four reviewers and make two of them fail.
The report says reviewers_effective: 2 and nothing about the other two.

Hypotheses rejected

Cause layer

Not the model layer — the invocation and observation layer. Issue #9's real defects were an
agy -p misinvocation (it had never actually run) and a Windows spawn ENOENT for the
cursor-agent shim. Both discarded their failure reasons and surfaced as "schema violation".

Remaining scope

Refs #15

@drvoss
drvoss merged commit dac7dae into main Aug 27, 2026
1 check passed
@drvoss
drvoss deleted the feat/quad-cli-observability branch August 27, 2026 07:34
drvoss added a commit that referenced this pull request Aug 27, 2026
…x docs (closes #15)

Implements the remaining scope of issue #15 that PR #16 explicitly deferred, plus three
non-blocking findings surfaced by cross-model review (Opus/Sonnet/Codex) of PR #16.

Transport-integrity nonce:
- Each run issues a random per-run token and instructs every reviewer to echo it back as a
  top-level transport_nonce field, so a schema-valid response can be distinguished from one
  that silently worked from a truncated/stale/altered prompt.
- reviewers.nonce_status records confirmed/not-echoed/mismatch/unavailable per declared tool
  (only under --artifact, alongside the rest of reviewers/environment).
- A mismatch (present but wrong echo) drops that reviewer from consensus even though its JSON
  was otherwise schema-valid. A missing echo is NOT penalized -- it is indistinguishable from
  an older CLI/model that never learned the field, per issue #15's own framing.
- QUAD_CLI_TRANSPORT_NONCE env var overrides the generated token for deterministic test fixtures
  only.

--min-reviewers revisit: already resolved by PR #16's documented decision to keep the default at
2 with recorded rationale; no code change needed, closing out the remaining issue #15 item.

Review follow-ups:
- observed_failure diagnostics now redact embedded absolute paths (home-dir and otherwise),
  not just resolved_path, closing the leak Codex's review of PR #16 found.
- Documented that reviewers/environment are only populated under --artifact (doc previously
  implied they were unconditional like status/reviewers_effective).
- Documented the ~40s, --gate-timeout-exempt cost of --artifact's CLI version re-probing.

Refs #15
drvoss added a commit that referenced this pull request Aug 27, 2026
…fore

Sonnet's cross-review of this PR found that placing the nonce instruction before <diff>
only proves the reviewer received the instructions header, not the diff body -- the
realistic failure mode (tail truncation of the usually-large diff) would still let a
reviewer see and correctly echo the nonce while never receiving the diff, producing a
false 'confirmed'. Moving the instruction after </diff> means confirmed now requires
having received the entire prompt, diff included; any truncation before that point
yields not-echoed instead.

Also verified (and rejecting as a false positive) Sonnet's other finding: the local
'main' branch ref used during review was stale (pre-dating PR #16's squash-merge),
which made PR #16's already-merged --min-reviewers rationale text look new in a diff
against local main. origin/main already contains it; no change needed there.
drvoss added a commit that referenced this pull request Aug 27, 2026
)

* fix(quad-cli): add transport-integrity nonce, redact leaked paths, fix docs (closes #15)

Implements the remaining scope of issue #15 that PR #16 explicitly deferred, plus three
non-blocking findings surfaced by cross-model review (Opus/Sonnet/Codex) of PR #16.

Transport-integrity nonce:
- Each run issues a random per-run token and instructs every reviewer to echo it back as a
  top-level transport_nonce field, so a schema-valid response can be distinguished from one
  that silently worked from a truncated/stale/altered prompt.
- reviewers.nonce_status records confirmed/not-echoed/mismatch/unavailable per declared tool
  (only under --artifact, alongside the rest of reviewers/environment).
- A mismatch (present but wrong echo) drops that reviewer from consensus even though its JSON
  was otherwise schema-valid. A missing echo is NOT penalized -- it is indistinguishable from
  an older CLI/model that never learned the field, per issue #15's own framing.
- QUAD_CLI_TRANSPORT_NONCE env var overrides the generated token for deterministic test fixtures
  only.

--min-reviewers revisit: already resolved by PR #16's documented decision to keep the default at
2 with recorded rationale; no code change needed, closing out the remaining issue #15 item.

Review follow-ups:
- observed_failure diagnostics now redact embedded absolute paths (home-dir and otherwise),
  not just resolved_path, closing the leak Codex's review of PR #16 found.
- Documented that reviewers/environment are only populated under --artifact (doc previously
  implied they were unconditional like status/reviewers_effective).
- Documented the ~40s, --gate-timeout-exempt cost of --artifact's CLI version re-probing.

Refs #15

* fix(quad-cli): place transport-integrity nonce after the diff, not before

Sonnet's cross-review of this PR found that placing the nonce instruction before <diff>
only proves the reviewer received the instructions header, not the diff body -- the
realistic failure mode (tail truncation of the usually-large diff) would still let a
reviewer see and correctly echo the nonce while never receiving the diff, producing a
false 'confirmed'. Moving the instruction after </diff> means confirmed now requires
having received the entire prompt, diff included; any truncation before that point
yields not-echoed instead.

Also verified (and rejecting as a false positive) Sonnet's other finding: the local
'main' branch ref used during review was stale (pre-dating PR #16's squash-merge),
which made PR #16's already-merged --min-reviewers rationale text look new in a diff
against local main. origin/main already contains it; no change needed there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant