Repository navigation
feat: add bounded local Agent smoke mode - #288
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e4aab1053
ℹ️ 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".
| citations = [ | ||
| {**citation, "text": "源码片段已核验,仅用于本次分析"} | ||
| for citation in citations |
There was a problem hiding this comment.
Redact cited source excerpts from the answer too
When the model repeats a cited source excerpt in parsed["text"], _verify_answer_boundary removes that citation text from reference_text before checking for leaked source lines, so the answer passes. These lines redact only the citation object; the unredacted answer is then persisted in both draft.content and analysis.answer, violating the manual mode's promise not to store submission-source excerpts. Reject source text appearing in the answer or redact it before either field is stored.
Useful? React with 👍 / 👎.
| if len(code) > MAX_MANUAL_SOURCE_CHARS: | ||
| raise AgentError(413, "source_too_large", 41300) |
There was a problem hiding this comment.
Apply the prompt limit before the first model call
For source containing multibyte characters or many JSON-escaped characters, len(code) <= 12_000 can pass even though the serialized tool result exceeds DeepseekModel's 24,000-byte prompt estimate. Because the source is added only after the model's first tool-request turn, that first paid request is dispatched and reserved before the second turn rejects the oversized prompt, so an accepted submission within the documented source limit cannot be analyzed and still consumes budget. Preflight the serialized source tool result or enforce a compatible UTF-8/JSON byte limit before starting the graph.
Useful? React with 👍 / 👎.
| "limit_micro_usd": 182_000_000, | ||
| "attempts": 18_000, |
There was a problem hiding this comment.
Include the still-usable V20 allowance in the cumulative cap
The new $182 allowance is calculated from V20's historical committed and unresolved amounts only, but the V20 period itself still has an independent $2.885422 budget and this setup neither accounts for its current usage nor halts it. Consequently, if V20 remains active, the old liabilities plus both usable allowances total $202.269632, and consuming more than $0.615790 from V20 alongside this manual period can exceed the stated $200 cumulative authorization. Bind preparation to the live V20 snapshot and remaining cumulative headroom, or retire that allowance before activating this one.
Useful? React with 👍 / 👎.
Summary
receipt.failureReasonafter successful analysis and hide legacy stale failure values when a successful analysis is already persisted.Verification
uv run pytest -q tests/test_agent_service.py::test_offline_analyze_resumes_same_graph_and_cas_persists_answer— passed.uv run pytest -q tests/test_repository_corpus.py tests/test_corpus_manifest.py— 67 passed.awaiting_confirmationdraft with citation verification; reloading shows the successful status without a stale failure indicator.mainas3b3a6439d40eacf27a06594cca91483488b8583f.Related: DAV-58.