Skip to content

fix(review): a group-analysis reply that fails its checks is neither cached nor served #1013

Closed

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

Delivery

  1. One PR (M), after fix(review): a group-analysis reply cut at its token cap is rejected, not shown as a checked explanation #876. Files: src/devops_cli/review/analysis.py, src/devops_cli/config/constants.py, src/devops_cli/ai/client/unified.py, src/devops_cli/ai/response_cache.py, tests/test_review_group_analysis.py, tests/test_ai_client_finish_reasons.py, changelog.d/1013.md. Fixes fix(review): a group-analysis reply that fails its checks is neither cached nor served #1013.

Acceptance criteria

  • _execute_single_group_job calls chat with max_retries=0 and a validator. The validator accepts a reply only when it parses to a GroupAnalysisOutput and passes verify_group_analysis. This follows the pattern in ai/client/structured.py:223-239, and each reply is parsed and checked only once. Unlike structured.py:239, the job does not re-wrap the rejected reply in a new LLMResponse, because that drops its finish_reason (models.py:143, :160). It reads the finish reason from the reply that ReplyRejectedError carries (models.py:68-76).
  • A reply the validator rejects is never cached. A cached reply the validator rejects is not served, and the call goes to the model. Test: an LLMClient uses a tmp cache seeded at a group's key with an unparseable reply, and its stubbed dispatch returns a valid reply. The group makes one model call and is verified, and the entry then holds the new reply.
  • No resample: each group makes at most one model call per run, whether its reply fails to parse, fails a G10 check, is empty or is cut. Group analysis therefore keeps feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137's "model calls ≤ finding groups + 1", where the +1 is feat(review): related findings are linked by shared CWE, rule family, symbol-graph component or package, and one review-level plan orders the work across groups #1148's plan job.
  • A reply refused on ReplyRejectedError is recorded with the reason the job gives it today: schema-validation-failed when it does not parse, and the G10 reasons when a check fails. With fix(review): a group-analysis reply cut at its token cap is rejected, not shown as a checked explanation #876 in place, a reply whose finish reason is length is recorded as reply-truncated. None of these is recorded as model-call-error, which stays for client and transport errors. An empty reply with no reasoning never reaches the validator. The client raises a plain AIClientError for it (unified.py:629), so it stays model-call-error.
  • Tests use a stubbed dispatch and a tmp cache, with no network:
    • an unparseable stop reply makes 1 call, is recorded as schema-validation-failed and writes no cache file, and a second run calls the model again;
    • a parseable reply with an unknown finding id makes 1 call, is recorded as unknown-finding-id and writes no cache file;
    • a valid reply is cached, and a second run makes no model call and records verified;
    • a cut, unparseable reply makes 1 call and is recorded as reply-truncated;
    • an empty reply with no reasoning makes 1 call, where today it can make up to 5, and is recorded as model-call-error.
  • Each test runs in under 1 s.
  • tool_call joins CONST_UNCACHED_FINISH_REASONS. A stub reply with finish reason tool_call is returned and leaves no cache file.
  • Each new cache entry records the served_by and model its reply carried, next to the requested alias that model holds today. A hit returns them on its LLMResponse, and backend_info is still the cache marker.
  • The stored served_by is the value extract_served_by returns, with no userinfo. Test: a served-by header whose URL carries credentials leaves none in the cache file.
  • changelog.d/1013.md records the fix under ### Fixed, and CHANGELOG.md is not edited.
  • uv run devops ci passes.
  • (person-run) Run two branch reviews of the same commit with group analysis on: after refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 PR 1, or before it with a persona on. In the second review's profile.json, the report stage counts no more cached calls than the first review's analysis.json has verified groups.

Current references (at 3dd7fa6)

  • src/devops_cli/review/analysis.py:
    • :700-706: the chat call, with no validator and no max_retries.
    • :709: schema-validation-failed.
    • :667-686: the parser.
    • :630-664: the G10 checks. :640 and :772: the finding-id check reads every admitted finding id in the review. :513-519: the code-quote check reads whole files.
    • :813 and :827: any exception becomes model-call-error.
    • :810: model_calls = len(jobs).
    • :73-74 and :157: GroupAnalysisOutput is an extra="forbid" model.
  • src/devops_cli/ai/client/unified.py:
    • :614-615: the only gate on writing the cache is the finish reason.
    • :555-575: the cache read applies the caller's validator.
    • :618-628: a rejection raises ReplyRejectedError carrying the LLMResponse. :629: an empty reply or an error payload gets a plain AIClientError.
    • :753-759: attempts are max_retries + 1.
    • :507-537: _cache_chat_entry drops served_by and the model that answered.
  • src/devops_cli/ai/client/structured.py:223-239: the validator, max_retries=0 and ReplyRejectedError pattern.
  • src/devops_cli/ai/client/models.py:68-76: ReplyRejectedError.reply holds the reply. :143 and :160: an LLMResponse built from a string has finish_reason None.
  • src/devops_cli/config/constants.py:2193-2195: CONST_UNCACHED_FINISH_REASONS. :2167, :2169 and :2177 map provider reasons to tool_call.
  • src/devops_cli/config/defaults.py:82: DEFAULT_AI_MAX_RETRIES is 4. :119-120: the cache is on with a 7-day TTL.
  • src/devops_cli/ai/client/openai.py:86-111: the request sends no tools field.
  • src/devops_cli/ai/client/network.py:54-67: extract_served_by strips userinfo.
  • src/devops_cli/ai/response_cache.py:26-45: CachedLLMResponse has no served_by field. :235-279: set.
  • src/devops_cli/ai/review/pipeline.py:4191-4198 and :4854: group analysis runs only with personas until refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 PR 1.
  • src/devops_cli/ai/review/profile.py:248-249 and src/devops_cli/ai/review/runner.py:1070: cached calls are counted per stage, and group analysis runs in report.

Dependencies and order


Problem

The response cache stores any complete reply and serves it again for 7 days. Before it caches a reply, the client checks only that it is not empty and not a JSON error payload (_validate_response_text, src/devops_cli/ai/client/unified.py:323-341, called at :653), plus any validator the caller passes. Neither review stage passes one. The persona agent calls chat_messages(system, messages, enable_thinking=...) (src/devops_cli/ai/agents/agent.py:887), and the verifier calls client.chat(...) (src/devops_cli/ai/review/verification.py:2128-2130). Only the legacy persona loop passes one (src/devops_cli/ai/review/runner.py:880). Since #966, cut, filtered and failed replies are not cached (unified.py:626, src/devops_cli/config/constants.py:2017-2019). A complete reply the review cannot use still is.

Measured on .data/cache/llm (5,000 entries, read at about 20:52 UTC on 2026-10-02 and re-checked at 21:13 with the e4ea2e0 parsing code):

  • 20 persona entries the pipeline cannot use: 14 that do not parse (11 of them empty) and 7 that echo the ReviewResult JSON schema. One echo is also among the 14.
  • 121 verifier entries with no verdict object: 108 that do not parse (76 of them empty) and 13 that parse to a list with no object in it.

At 21:55 UTC both counts were unchanged, 20 and 121: eviction had removed one old unparsed persona entry, and s6 (below) had added an empty one.

Four branch reviews of release/v0.2.25 ran on 2026-10-02 before #951: s1 to s4 (20261002-142541, -163203, -180320 and -200610). s1 had no cache hits; s2, s3 and s4 replayed such replies. In s4 (cf8ae47), 301 persona pages came from the cache, and 4 of them got a schema echo written in s1 to s3:

  • changelog.d/588.md (llm_56f798ba…, served in s2, s3 and s4);
  • docs/agent/tasks/task-947-delete-dynamic-workflow-and-code-mode.md (llm_a879cbd7…, s3 and s4);
  • tests/test_harness.py (llm_da826747…, s3 and s4);
  • docs/agent/tasks/task-961-argo-namespace-and-cli-state-handling.md (llm_f712b111…, s4).

All four came from ollama-16gib (gpt-oss:20b). Three ended with finish reason stop. The s1 reply (llm_56f798ba…, ledger row 8744) predates recorded finish reasons; its 5,155 completion tokens are under the 8,192 cap. s4 also wrote a fifth echo, llm_1267029394… (ledger row 9368, ollama-16gib, stop), and read it as an empty review. tests/test_harness.py had no usable persona reply in s2, s3 or s4. s5, at 38517a8 with #951's prompts, got one. The measured harm is small. In 3 of the 4, the model's own reasoning ended with no findings. The fourth dropped one finding, and it was false: typing.sys exists on the project's Python 3.14. The mechanism has no guard.

A schema echo reads as a clean file. ReviewResult gives every field a default and ignores unknown keys (src/devops_cli/ai/review_schema.py:1180-1189). A reply that is the JSON schema ($defs, properties) therefore validates as a review with no findings. fix_llm_response returns that model (agent.py:901-905). The agent skips its schema retry, which runs only when there is no model (agent.py:966-977), and returns it (agent.py:1013). The pipeline prefers it to parse_review_response (src/devops_cli/ai/review/pipeline.py:237-242). The outcome is empty, and nothing flags it. Of the persona entries on disk (3,814 at 21:55 UTC), in 2 parse_review_response recovers a finding this path drops: llm_a879cbd7…, and llm_9a2017e3… (docs/commands/k8s.md, s3). Both findings were false.

  • In s1 to s4, gpt-oss:20b (ollama-16gib and ollama-24gib, k8s/llm/gateway/configmap.yaml:99-108) answered 50 persona calls, 45 of them not cut. It sent 6 schema echoes, all on ollama-16gib (6 of that tier's 38 replies that were not cut). qwen3-coder:30b (ollama-48gib and ollama-64gib, :89-98) sent 0 in 361.
  • A top-level $defs or properties key marks every echo that repairs to a JSON object. At 21:40 UTC, the e4ea2e0 repair code turned 3,820 of the 3,834 persona entries into an object. 6 of those carry such a key, and all 6 are echoes. Each of the other 3,814 has a findings key. The seventh echo (llm_da826747…) does not repair to an object and is already unparsed.

Verifier replies are replayed less today. The prompt carries each finding's criteria_execution_results, whose duration_seconds changes every run (verification.py:314-323). s4 served 13 verifier replies from the cache, and all 13 carried verdicts. One reply with no verdict was served before: llm_9f965cca…, a markdown "Findings Report" that parses to ["OPTIONS"], written 09-30 at 06:01 and served at 12:34. Such a reply leaves the file's findings UNVERIFIED with no note (verification.py:2133-2140). #846 takes criteria_execution_results out of the verifier input. Verifier prompts for unchanged files will then repeat more often (inferred; the 13 s4 hits already did), and an unusable reply among them will be served every run.

The cache checks a reply one way when it writes it and another way when it reads it:

  • On write, the check sees the LLMResponse with its reasoning, so empty content with non-empty reasoning passes (unified.py:329-331).
  • On read, it sees cached_entry.content, a plain string with no reasoning, and rejects it (unified.py:595-597). The call goes to the model again.
  • By then LLMResponseCache.get() has counted a hit, set last_accessed and rewritten the file (src/devops_cli/ai/response_cache.py:213-217, :227-232). Eviction removes the oldest mtime first (response_cache.py:98-110), so the lookup keeps the dead entry alive.

The cache held 87 such entries at 21:13, and none was ever served. Each has hit_count 0, so none was even looked up: the keep-alive above follows from the code but has not happened yet. 61 are replies cut before #966 whose reasoning used the whole budget. s4 added one: llm_8709b7de…, a verifier reply with finish reason tool_call, 24,002 prompt and 192 completion tokens (ledger row 9461, ollama-16gib). tool_call is not in CONST_UNCACHED_FINISH_REASONS, and no review call offers native tools: the gateway payload has no tools field, only the model, the messages, and sampling and reply-limit parameters (src/devops_cli/ai/client/openai.py:81-105). s6, at the tip, added another: llm_b4e25013…, the persona reply for docs/commands/ai.md (ledger row 9878, ollama-16gib, stop, 1,134 completion tokens, all of them reasoning). s6 recorded that file as unparsed, and the next review of the same commit will call the model for it again.

Nothing removes or bypasses a bad entry:

  • Persona pages run with max_turns_per_agent=1 (pipeline.py:937-945). The agent's turn starts at 1 (agent.py:857), so the reflection retry, which needs turn < max_turns (src/devops_cli/ai/agents/runner.py:471-482), never runs.
  • The page retry runs only on exceptions (pipeline.py:1360-1409). It would send the same key, which covers only provider, model, system, messages and enable_thinking (unified.py:720-726, response_cache.py:166-197).
  • The verifier makes one call (verification.py:2126-2140).
  • Nothing deletes a single entry except expiry on lookup (response_cache.py:208-212, :223-226). The TTL counts from created_at (response_cache.py:48-52), and each hit rewrites the file (:216, :231), so an entry served every session is the last one evicted. The only ways out are devops ai cache clear (src/devops_cli/commands/ai_cache.py:89-92), which removes every entry, and --no-cache.

A blind file reads as clean. tests/test_harness.py is flagged only on the console, as "(unparsed: Principal DevSecOps Engineer)" (pipeline.py:404-413), in profile.json, and in its per-file record (files/tests_test_harness_py.json, unparsed_personas). In s4's review.md it appears only in the network table (lines 3096 and 3130). findings.json has no finding for it, only its two network references. The three echo files are flagged nowhere.

Three smaller defects turned up with these:

  • The entry does not record which model answered. _cache_chat_entry (unified.py:539-569) drops the reply's served_by and model, and every entry's backend_info names only the gateway. The four replayed echoes above were tied to gpt-oss:20b only through the spend ledger. In s4, 32 of the 301 persona hits were gpt-oss:20b replies.
  • A failure while evicting files fails the call. _evict_excess_disk_files stats each file without a guard (response_cache.py:102). If another process removes a file between the glob and the stat, for example a second review or devops ai cache clear, the exception leaves set() and reaches the dispatch retry loop (unified.py:646-668). The reply is discarded and the model is called again. Offline, with eviction always raising FileNotFoundError, one chat() made 6 model calls and then raised "Cannot connect to AI provider API". A single race cost one extra call.
  • devops ai cache status and clear look at a different cache. They build it with default arguments (commands/ai_cache.py:30, :91; response_cache.py:146-152, :433-449): data.cache_dir, 1,000 entries, enabled. The review clients use ai.cache (unified.py:211-238, src/devops_cli/config/settings.py:373-380). With DEVOPS_CLI_DATA_DIR set, reviews used /workspaces/devops-cli/.data/cache/llm while status and clear used <DATA_DIR>/cache/llm. Without it, status reports max_entries 1000 against the 5,000 reviews enforce. clear is the only way to remove a bad entry.

Some prompts may be cut on the server before the model sees them (inferred). 78 entries, all from 09-30, report exactly 8,002 prompt tokens. 67 of the 76 verifier ones give no verdict object, against 35 of the 78 verifier replies to larger prompts on the same tier that day. The ledger also records 8,002 prompt tokens on 3 file reviews on 09-27 and 09-28, on ollama-64gib and two vLLM servers. Such a reply is cached under the full prompt's key. But calls at 8,002 and at up to 15,892 tokens interleave in the same hours on the same tier, so the cause is not established (see Key questions).

Since #951 (38517a8) changed the persona prompts and verify_finding_system.md, no review at the branch tip (now 79e1e93) can reach the bad entries written before it. They expire by 10-09. Session 20261002-205520 (s5, 38517a8) wrote 379 persona and 20 verifier entries, and none is empty, unparsed or an echo. The mechanism is unchanged at the tip: s6 (20261002-214641, 79e1e93) cached llm_b4e25013… above.

Line references are at e4ea2e0. At 79e1e93 the cited code is unchanged, but #987 moved pipeline.py lines (:237 is now :246, :404 is :413, :937 is :946, :1360 is :1522). ReviewResult is at review_schema.py:1194 and still defaults every field, and CONST_UNCACHED_FINISH_REASONS is at constants.py:2021.

Acceptance criteria

  • The persona agent and the verifier pass the client a validator (the argument chat and chat_messages already take) built from the parse their stage uses. The persona check rejects a reply that does not parse under the pipeline's rule (pipeline.py:237-242) or is a schema echo. The verifier check rejects a reply whose _parse_verifier_payload result (verification.py:2055-2063) holds no JSON object, as ["OPTIONS"] does. The client neither caches nor serves a reply that fails its check.
  • A schema echo is never read as an empty review. A reply that repairs to a JSON object with a top-level $defs, $schema or properties key keeps the findings parse_review_response recovers from it, and its outcome is otherwise unparsed. It is never cached.
  • A rejected reply gets one fresh sample: a new model call, never a cache read. If that one is rejected too, the stage uses it as today, uncached, and raises nothing. The persona outcome is unparsed (or findings when findings are recovered), and the verifier leaves the findings UNVERIFIED (fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846 adds the note). A reply whose finish reason is in CONST_UNCACHED_FINISH_REASONS gets no fresh sample: it is already uncached, and fix(review): a group-analysis reply cut at its token cap is rejected, not shown as a checked explanation #876 and feat(ai): gpt-oss reasoning effort for group analysis is measured and set on its gateway deployments #479 own cut replies.
  • With a stub model whose replies are always schema echoes, a page makes exactly 2 model calls, records unparsed and writes no cache entry. With a stub whose first reply is an echo and whose second is a valid review, the page records the second reply's findings and caches only that reply. With a stub whose reply is cut (length) and does not parse, the page makes 1 model call.
  • A cached entry the client rejects on lookup is deleted, and the call goes to the model. With a tmp cache seeded with an echo at a page's key and a stub that returns a valid review, the page makes one model call, and the entry then holds the new reply.
  • A reply with empty content is never cached, whatever its reasoning, and tool_call joins CONST_UNCACHED_FINISH_REASONS. A stub reply with content "" and reasoning, and a stub reply with finish reason tool_call, are each returned and leave no cache file.
  • Each new entry records the served_by and model its reply carried, beside the requested alias the entry's model field holds today. A hit returns them on its LLMResponse, with backend_info still cache.
  • A failure while writing or evicting cache files neither fails nor repeats the call. With eviction raising FileNotFoundError, one chat() makes one model call and returns its reply.
  • devops ai cache status and clear use the directory, TTL, size cap and enabled flag the review clients use. With an absolute ai.cache.dir and DEVOPS_CLI_DATA_DIR pointing at two tmp directories, clear empties the ai.cache.dir one, and status reports the configured max_entries.
  • review.md lists each file whose persona reply ended unparsed, so a file no persona reviewed does not read as clean.
  • The tests use stub clients, a tmp cache directory, and fixtures built from ReviewResult.model_json_schema() in the shapes of llm_56f798ba… ($defs and properties), llm_a879cbd7… (a finding nested in the schema) and llm_da826747… (does not repair to an object). They make no network call and add well under 1 s to uv run devops ci.
  • changelog.d/1013.md records the fix under ### Fixed. CHANGELOG.md is not edited.
  • uv run devops ci passes.
  • (person-run) Over a copy of .data/cache/llm, the persona check rejects each entry named here that is still present and accepts every other persona entry that has a findings key.
  • (person-run) Two branch reviews of the same commit on the homelab gateway: the second prints no "(unparsed: …) handled by cache" line.

Key questions

  • Where does the check run: in the client, or in the pipeline after parsing? (proposed) In the client, through the validator argument chat_messages already takes. The client is the one place that both writes the cache (unified.py:626, :653) and reads it (:595-597), and the legacy review loop already passes parse_review_response this way (runner.py:880).
  • How many fresh samples does a rejected reply get? (proposed) One. With a validator, the client sends up to max_retries + 1 calls (6 with the current config, unified.py:744-750), and the page retry (pipeline.py:1360-1409, 6 attempts) would multiply that to 36 calls for one page. Those retries are for transport errors. gpt-oss:20b echoed 6 of its 45 persona replies that were not cut, so a second sample usually parses. Cut replies get no fresh sample: in s4, 31 of 101 verifier calls were cut (ledger, ollama-16gib and -24gib), and a resample would resend the same prompt against the same cap.
  • What marks a schema echo, and why not require a findings key? (proposed) A top-level $defs, $schema or properties key after repair. It matched all 6 echoes that repair to an object and no other persona reply. Requiring findings would miss 2 of the 6, which carry findings: [] next to $defs (llm_1267029394…, llm_6a2ffa71…).
  • Should an empty reply with reasoning be cached and served, since the entry keeps the reasoning? (proposed) No. Every review caller reads content. None of the 87 such entries was ever served, and 61 of them are cut replies whose reasoning used the whole budget.
  • Should the served model join the cache key? (proposed) No. The client does not know it before the call, and the request names the alias. Storing it lets fix(ai): response-cache hits are counted as cached requests #816 and feat(review): every reported finding is admitted with its producer's anchor and a location that exists in the reviewed commit, the review writes findings.sarif, and review.md shows findings and suppressions #871 attribute a hit, and it makes a per-model echo rate visible from the cache alone.
  • Should the client refuse to cache a reply whose reported prompt tokens fall well below its own count of the prompt? (proposed) Not in this issue. The cause of the 8,002-token pattern is not established. The checks here already keep 67 of the 76 such verifier replies out of the cache (30 empty, 24 that do not parse, 13 with no verdict object). It needs the gateway's per-deployment context limits first, and a follow-up issue if they explain it.
  • Should the existing bad entries be purged? (proposed) No. Pre-1.0 needs no migration. No review at the tip can reach them, they expire by 10-09, and the lookup check deletes any it meets.
  • Should the schema leave the persona system prompt, so that models stop echoing it? (proposed) Not here. feat(review): review prompts state a threat model and an evidence bar, and send nothing the pipeline does not use #951 already trimmed it at the tip, and an echo needs the check whatever the prompt says.

Depends on: none.
Order: lands no later than #846's change to the verifier input (_build_validation_prompt), so unusable verifier replies are out of the cache before verifier prompts start to repeat. #816 edits the same hit return (unified.py:739-742); whichever lands second rebases, and a lookup this issue rejects stays out of #816's hit count. #987 has merged (b1fddd0), so the review.md line builds on its report renderers. #1014 moves the default cache directory under the data directory; the status and clear criterion uses an absolute ai.cache.dir, so it holds whichever lands first.
Related: #816 (hits counted as cached requests). #846 (verifier notes and verifier input). #876 (cut persona replies). #966 (cut replies not cached). #951 (prompts at the tip). #871 (producer attribution). #482 (per-run cache reporting). #962 (per-model gateway groups; a route change leaves cached replies in place). #950 (why a replayed false positive is not suppressed). #1014 (the cache trusts its files and writes where they point).

Activity

  1. added
    type/bug
    scope/ai
    scope/review
    priority/p1-high
    on Oct 2, 2026
  2. added this to the v0.2.29 milestone on Oct 2, 2026
  3. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Evidence from the model-choice evaluation (2026-10-03): cached replies replay across sampling changes. Source: .data/model-choice-20261003.md, section 3, and its verification pass. Lines are at e3ff98c.

    The key leaves sampling out. generate_key hashes the provider, model, system prompt, messages and options (ai/response_cache.py:166-197). The client passes only {"enable_thinking": ...} as options (ai/client/unified.py:707-726). Temperature, top_p, reasoning effort and the reply cap are not in the key.

    It happened on 2026-10-03.

    • The owner moved analysis and verification to qwen3-coder's card sampling, 0.7 / 0.8 (config.yaml edited at 04:58Z; the earlier values were reported as 1.0 / 0.5 and cannot be checked).
    • A later review of unchanged pages without --no-cache would be served replies made with the old sampling, for up to the 7-day TTL. The evaluation had to tell the owner to run the first review with --no-cache.
    • No branch or path review records its sampling. review_setup runs only for benchmark, corpus-score and sample-validation runs (commands/review.py:1430, :1783, :2021). So a replayed reply cannot be recognised afterwards, and the effect of the change on S9/S10/R2-style runs cannot be measured from the sessions.

    Where the fix goes. This item's key question covers only the served model, so the sampling key is filed in #1070. There the cache options carry temperature, top_p, reasoning_effort and the reply cap, and every review session records its sampling. Both items edit the key construction in unified.py, so whichever lands second rebases. If you would rather have it here, #1070's cache criterion moves to this item.

  4. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Frozen by the evidence-first review redesign (#1137, owner direction of 2026-10-03): patches to the model generator and verifier stop, and tool-layer fixes continue. The review's reply cache is replaced in phase P3 by content-addressed review jobs (P3-1 in #1137, filed when that phase starts); its sampling-key part already moved to #1070 (owner comment, 2026-10-03). Before this item closes, the defects that are not review-specific move to #1014 or a new item, because chat and analysis keep the client cache: the schema echo, empty content, the eviction race, and status/clear reading a different directory.

    It stays open, labelled status/blocked. Its v0.2.29 placement is left to the roadmap tooling. The review cache defect stays live until #1151; the tools-only review avoids it meanwhile.

  5. added
    status/blocked
    on Oct 3, 2026
  6. removed this from the v0.2.29 milestone on Oct 8, 2026
  7. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Moved to the backlog: a Blocked item can't join a starting release (v0.2.29). (devops roadmap reprioritize)

  8. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Moved 2026-10-08. The owner's freeze comment of 2026-10-03 named four defects here that are not review-specific: "the schema echo, empty content, the eviction race, and status/clear reading a different directory". #1137's frozen table says they move to #1014 first. They are now in #1014's "Update 2026-10-08" section, with evidence at 910b823 and offline acceptance criteria:

    • The schema echo. No caller outside review shows the model a schema, so what remains outside review is two client-side defects:

      • chat_structured caches a first-attempt reply that fails its schema.
      • Intake's ModelProposal accepts any JSON object, its own schema included, as an empty proposal. Intake then skips that candidate on every rerun.

      The fix is pydantic's extra="forbid" and required fields on that schema, not a key check in the client.

    • Empty content. A reply with empty content and non-empty reasoning is cached. Every lookup then refuses it. When the new reply is not cached, the lookup also keeps the dead entry alive.

    • The eviction race. A cache file removed during eviction turns a good reply into a false "Cannot connect" error.

    • devops ai cache status and clear. Once data.dir, DEVOPS_CLI_DATA_DIR or an ai.cache value is set, they read a different directory and different settings from the clients. fix(security): the response cache writes only inside its own directory and is never read from the tree under review #1014 already rewrites that directory resolution.

    These criteria from this item now live in #1014:

    • the client side of "A cached entry the client rejects on lookup is deleted";
    • the empty-content half of "A reply with empty content is never cached…";
    • "A failure while writing or evicting cache files neither fails nor repeats the call";
    • "devops ai cache status and clear use the directory, TTL, size cap and enabled flag the review clients use".

    These stay here:

    The last two apply to the shared client cache too. P3-1 replaces only the review's cache, so when this item closes they close unfixed, unless they are filed again.

    #1013 stays frozen, with the label status/blocked and board Status Blocked. Roadmap reprioritize moved it from v0.2.29 to the backlog on 2026-10-08. It closes when the review job queue (P3-1 in #1137) lands. The review-side cache defect stays live until #1151; meanwhile the tools-only review (--no-persona-review --no-verification) avoids it.

  9. modified the milestones: v0.2.34, v0.2.35 on Oct 9, 2026
  10. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Moved to the backlog: a Blocked item can't join a starting release (v0.2.35). (devops roadmap reprioritize)

  11. changed the title [-]fix(review): the response cache stores and serves only replies the review can use, and a schema echo no longer reads as a clean file[/-] [+]fix(review): a group-analysis reply that fails its checks is neither cached nor served[/+] on Oct 18, 2026
  12. removed
    status/blocked
    on Oct 18, 2026
  13. added this to the v0.2.39 milestone on Oct 20, 2026
  14. added
    status/in-progress
    on Oct 21, 2026
  15. added a commit that references this issue on Oct 21, 2026
    e864538
  16. dan-petty commented on Oct 21, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1812, merged into release/v0.2.39 as e864538.

    A group-analysis reply that does not parse or fails a G10 check is no longer cached or served from the cache, and the group makes one model call.

    10 file(s) changed.

    How it was verified

    Check runs at e7ac168:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • devops-cli: pass
    • zizmor: pass
    • bandit: pass
    • CodeQL: pass
    • Rule Pack Tests: pass
    • Static Analysis: pass
    • Tests & Coverage: pass
    • Fail-to-Pass Check: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Dependency Freshness: skipping
    • Service Image: skipping
    • DevContainer Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1013-group-analysis-validator.md:

    No Acceptance Criteria section.

  17. added a commit that references this issue on Oct 23, 2026
    f209f6c
  18. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/aiscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions