Skip to content

docs(jev): consolidate Jev docs into one design, plan, ledger and runbook - #210

Merged
lg2m merged 5 commits into
mainfrom
docs/eng-791-jev-consolidation
Sep 29, 2026
Merged

lg2m merged 5 commits into
mainfrom
docs/eng-791-jev-consolidation

Conversation

@lg2m

@lg2m lg2m commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

ENG-791: consolidate Jev documentation

Linear: ENG-791. Folds in the proposal from draft #193 (ENG-938); does not close either.

What changes for users

Nothing at runtime. Documentation only: no Rust, configuration, protocol, schema, threshold or default change. Jev stays default-off and independently opt-in.

Opted-in users report that most calls sent to Jev come back to them. The Jev docs were split across a superseded runtime review, an untracked audit, a shipped opt-in plan and ledger, and an unmerged proposal. This PR replaces them with one of each:

File Role
docs/design/jev.md (new) What Jev is (vendor claims separated from QQ evidence); the four capabilities as built with bounds and ADRs; § 3: eight findings on why work is handed back, re-checked against main 1e91895; direction, acceleration hypotheses, rejected alternatives
docs/plans/jev.md (new) The only Jev plan: JV0–JV13 with acceptance and the qualification procedure
docs/plans/progress/jev.md (new) Ledger; carries the J1–J9, RR3, DA5 and 2026-09-25 audit history
docs/adr/0047-jev-approval-hold-lifecycle.md (new, Proposed) Consent and the server-owned hold lifecycle; carried from #193's colliding "0046"
docs/runbooks/jev.md (rewritten) Operator procedure per capability, plus current limitations and workarounds

Removed: design/jev-runtime-review-2026-09-18.md (its opt-in contract shipped in #74–#78), plans/jev-opt-in.md and plans/progress/jev-opt-in.md (J1–J9 shipped; summarized in the new ledger). Git history keeps them. ADR-0028/0030/0034/0041 are unchanged because they are immutable.

Why Jev hands work back (design § 3, summary)

  1. Under auto, Jev mostly receives shell and network calls, then is told to abstain on "externally visible" actions.
  2. Root sessions send no task brief (tool_calls.rs:772).
  3. ToolApprovalRequested prompts the human before Jev answers.
  4. Headless runs with Jev only deny immediately (main.rs:405).
  5. jev_approval off needs a restart, and profile values are ignored.
  6. All three parsers reject rounded probabilities (abs() > 0.001).
  7. A single broad question, and no per-attempt receipts.
  8. enforce and routing are serial or too coarse.

Findings 3–6 are defects that JV1–JV3/JV5 fix without any policy change.

Design decisions

Review round

Codex made 6 comments. Fixed: the Off procedure (profile values beat top-level ones), the approval-preview disclosure (lists the fields sent unmasked), the audit provenance (never on main), and the JV0 and ledger wording. § 4 is now marked as the target, not current behavior, and was left in place.

Verification

  • Every relative link under docs/** resolves; Jev heading anchors match; git diff --check is clean.
  • Nothing links to the deleted files.
  • The website build (nub run build) did not run locally: website/node_modules is incomplete (html-escaper missing after nub install). CI's site build is the check for guide changes (cli.md, configuration.md anchor).

Performance and compatibility

None; documentation only.

Owner decisions (plan § Open owner decisions)

  1. Accept this as the only Jev plan and ADR-0047 as its lifecycle decision (ENG-938 / docs(plans): plan opt-in Jev usefulness and compare PRs #187/#189 #193 closed as superseded).
  2. Immediate stop vs. next-run Off for JV9.
  3. The pilot's authority and egress scope, and the A13 utility gate.
  4. Whether any of feat(jev): integrate session controls and strict verification #187's ladder or Strict completion returns in a later slice.

…book

Opted-in users report that most calls sent to Jev come back to them. The
Jev documentation was split across a superseded runtime review, an
untracked audit, a shipped opt-in plan and ledger, and an unmerged
proposal (#193), so there was no single account of why or what is next.

- design/jev.md: what Jev is (vendor claims separated from QQ evidence),
  the four capabilities as built, eight findings on why work is handed
  back (re-checked against main 1e91895), and the direction.
- plans/jev.md: the only Jev plan, JV0-JV13 with acceptance and the
  qualification procedure. Folds in #193 (ENG-938).
- plans/progress/jev.md: ledger carrying the J1-J9, RR3, DA5 and audit
  history.
- runbooks/jev.md: rewritten operator procedure with current limitations
  and workarounds.
- Delete design/jev-runtime-review-2026-09-18.md, plans/jev-opt-in.md and
  plans/progress/jev-opt-in.md; update indexes and cross-links; reserve
  ADR-0047 for the held-approval lifecycle (JV5).

Docs only. No Rust, configuration, protocol or schema changes.

Refs: ENG-791
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T00:38:14.471248Z 79f21d6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82e779260a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/runbooks/jev.md Resolved
Comment thread docs/plans/progress/jev.md Resolved
Comment thread docs/plans/jev.md Resolved
Comment thread docs/runbooks/jev.md Resolved
Comment thread docs/design/jev.md Resolved
Comment thread docs/design/jev.md Resolved
- Turning Jev off: profile values beat top-level ones, so require the
  QQ_JEV_*=off server overrides or clearing the profile's values.
- Approval preview: list the fields sent verbatim (workspace, working
  directory, edit path, recent action paths, grant lists); only the brief,
  command, diff and arguments are masked; the whole request is capped at 64 KiB.
- Design § 4 is the target, not as-built; note that enforce adds a serial wait today.
- The 2026-09-25 audit was never on main; point to 0c1cbd6 / refs/pull/193/head.
- Ledger: one writer per ledger. Plan status: JV0 in review.
- Owner decision 4 no longer refers to #189's feedback fix, which was not merged.

Linear: ENG-791
…ification steps

- docs/adr/0047-jev-approval-hold-lifecycle.md (Proposed): #193's "0046"
  decisions 1-7 and the hold-phase table, renumbered and without the
  #187/#189 framing. Indexed; root.md reservation marked Proposed.
- Plan acceptance: the #193 clauses with no counterpart in A1-A13 (grants
  survive Off, no full transcript, cancel/deadline and final-vs-advisory
  Deny, priceless fallback under a hard cap, receipt hashes, unknown MCP
  effects, rollout/backup/no auto-downgrade).
- Qualification procedure: run record, zero-connection proof, arm purposes,
  per-decision fields ("missing cost is not zero"), per-hold counting, and
  paired statistics.

Linear: ENG-791

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b41ad0f0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/design/jev.md Resolved
Comment thread docs/plans/jev.md Resolved
Comment thread docs/runbooks/jev.md Resolved
Comment thread docs/runbooks/jev.md Resolved
Comment thread docs/design/jev.md Resolved
Comment thread docs/plans/progress/jev.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52ecde28a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/runbooks/jev.md Resolved
Comment thread docs/plans/jev.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 79f21d629f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/runbooks/jev.md
verdict; a request that a human, cancellation or deadline overtakes may be
billed without being counted (design finding 7, fixed by JV6).

`/delegate off` withdraws both approval delegates for the session. It does

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify that /delegate off only affects the next hold

When /delegate off is issued while a held call already has a reviewer future in flight, this command only updates the session override; the current gate has already captured its delegate and can still accept an approval and execute the tool. docs/design/tools.md:1203-1208 correctly limits the switch to the session's next held call, so this runbook should state that rather than implying that it withdraws an already-running Jev or model review.

AGENTS.md reference: AGENTS.md:L141-L142

Useful? React with 👍 / 👎.

Comment thread docs/runbooks/jev.md
Comment on lines +70 to +73
**Limits and failures.** Review is bounded to 32 requests and 2 corrections
per run, 5 s per request, and 64 KiB per response. It shares the run's token
and cost allowance. A RED verdict after corrections, or an unavailable
reviewer during the run, is recorded as evidence, and the run completes. A

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document checkpoint admission failures at the stated bounds

For an enforce run that attempts a 33rd checkpoint, CheckpointContext::admit returns the request-limit error and crates/qq-core/src/lib.rs:3610-3616 terminates the run with a policy failure; hard-cost admission failures similarly terminate with BudgetExhausted. These cases are not reviewer outages and are not recorded as unavailable evidence, so this limits-and-failures section should distinguish them from the failures for which the run completes, especially because long tool runs can reach the named 32-request ceiling.

AGENTS.md reference: AGENTS.md:L79-L82

Useful? React with 👍 / 👎.

Comment thread docs/runbooks/jev.md
Comment on lines +172 to +174
**What it does.** Observation is enabled only while the command runs. It
never enables review or routing, changes run outcomes, or delays the next
run. Omit `--session-id` to observe all task sessions in the workspace.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge State that the observer only assesses future completions

When the observer starts after a run has already completed, it does not assess that run: src/advisory.rs:620-621 initializes the journal at the snapshot's current cursor, and the sink only reacts to later RunFinished events. The previous runbook explicitly said “newly completed runs,” while this rewrite now says it observes all task sessions without preserving that boundary; operators can therefore wait for a receipt that will never be created. State that only runs completing after the saved/current cursor are assessed, consistent with the CLI help's “future completed runs.”

AGENTS.md reference: AGENTS.md:L207-L210

Useful? React with 👍 / 👎.

@lg2m
lg2m merged commit 08694a3 into main Sep 29, 2026
6 checks passed
@lg2m
lg2m deleted the docs/eng-791-jev-consolidation branch September 29, 2026 00:42
lg2m added a commit that referenced this pull request Sep 29, 2026
* docs(plans): plan the autonomous, embeddable core (ENG-978)

Add a read-only source audit (core-autonomy-audit-2026-09-28) of what stops
qq-core from running one task unattended for hours and from being embedded,
and the plan that acts on it (autonomous-core.md, AC0-AC16, ledger).

Three proposed ADRs:
- ADR-0048: run bounds reset at their seams; ContinueRun and opt-in
  auto-continue of paused/interrupted runs, never re-executing a call
  without a recorded result.
- ADR-0049: a durable run goal re-stated verbatim after every compaction,
  a completion audit, an always-on loop guard, continue-if-idle.
- ADR-0050: a qq-harness composition crate out of src/, a tool-fetch
  feature, a CI-tested embedding example and public-surface hygiene.

Consolidation: delete mid-run-compaction.md (design is ADR-0039; MRC-4/5
move to AC14 and Goal 5), move RR12's loop result to AC4, bring
run-reliability status up to date (RR6-RR8.4 shipped; ResumeRun never built),
mark F03 shipped, reserve ADR 0048-0050 (0047 held by #210).

No code change.

* docs(plans): address Codex review on the autonomous-core plan (ENG-978)

Continuation names its run, admits only the session's latest prompt run,
and is race-safe through UNIQUE(continues_run_id). It carries exact limit
remainders against the original deadline, sends a notice instead of the
prompt a second time, and never auto-continues no_progress. The goal is
bound to its run chain and activated at claim, and renders whole within
8 KiB. The completion audit gets its own allowance. The loop guard is
progress-aware. update_goal is in every catalog, exposed per run, so plan
identity is unchanged. qq-harness takes public inputs and is proven by an
external smoke crate. Move PRs are ordered to build on their own. Protocol
pairs land as single PRs. AC15 and AC16 scopes are corrected. The
ADR-0039 edit becomes an appended clarification, and the RR8 remainder is
listed as open.

* docs(plans): address Codex second-pass review on the autonomous-core plan (ENG-978)

Goal writes are checked against a rendered-size cap with bounds that
provably fit. Continuation carries every cumulative RunLimits field and the
remaining repair_turns. AC11 owns every fetch consumer. The loop guard
rejects only after observed repeats and counts new reads as progress. The
reservation rebase travels with the compaction request because the marker
commits before the splice. Headless follows continuation chains.
achieved_pending_audit is durable before publish. Load stages stay a closed
enum. Also corrects the effect class name ReadOnly.

* docs(plans): address Codex third-pass review on the autonomous-core plan (ENG-978)

Correct the audit: in-run compaction shares and is refused at the 32-step
compaction budget, and ADR-0048/AC2 stop charging it there. Also correct the
audit's fsync-cost claims, since activity and chunk writes already share group
commits. AC15 becomes measure-first and keeps ADR-0003's committed JSON.
AC16 becomes a workspace retention gate and the single-session store bound
becomes linear growth. AC12.1 leaves RuntimeBuildError in the binary until
its catalog dependency moves. The goal PR owns the client reducer.

* docs(plans): fix four design faults from Codex fourth pass; stop enumerating slice files (ENG-978)

Loop guard: separate the seen set from the repeat counter so short cycles
still pause. A steer no longer claims to resume a finished run. from_runtime
takes an explicit workspace. RunPause becomes reason-tagged. qq-harness
depends on qq-protocol. Owned paths become starting areas: each slice owns
every consumer its type and wire changes force, gated by the workspace
build, and new state must reach snapshots and reducer state in the same PR.
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