Repository navigation
fix: remaining CodeCora scan findings — full sweep - #93
Merged
Merged
Conversation
Deferred MINOR/INFO findings from the 2026-09-18 full cora scan, fixed
directly (per maintainer call: no tracking issue):
Provider wire:
- openai: scrub() is a no-op for an empty secret (replace('') mangled
the whole message); non-string tool_call arguments are serialized
instead of silently replaced with '{}'; one ureq agent per provider
(connection reuse) instead of a fresh agent per request.
CLI host:
- NEW root-cause fix found by live E2E of this sweep: write_file was
the ONLY registered tool without a spec() override — providers got a
property-less schema and GLM legally answered arguments:{} (missing
'path' every call; loop guard tripped). Spec declares path+content;
regression test pins the schema.
- failed startups no longer leave a stray empty session file (registry/
provider are built before the session is created, run + chat).
- resume <id> "<prompt>" stores the memory summary like run does.
- chat says explicitly when a typed message was dropped after exhausted
mid-flight retries (the old copy implied it was recorded).
- session ids use strip_suffix (x.jsonl.jsonl no longer yields an
unusable id); binary_available honors the executable bit (unix) and
.exe (windows).
- tole-cli is now lib+bin: approval_flow integration tests drive the
REAL jailed WriteFileTool and InteractiveApprover instead of drifting
re-implementations (the scan's parity finding, fixed structurally).
Core tools:
- edit_file's approval line shows the actual old→new change (bounded
previews), not just the file name.
- edit_file temp files are unique per attempt (pid+nanos) and legacy
pid-only stale temps are swept up front — self-heal can no longer
race a concurrent same-pid writer.
- delete_file on a symlinked path removes the LINK, not the referent
the jail canonicalized to.
- job_start kills the spawned job when the pid file cannot be written
(no untracked orphan reporting failure).
- mcp: tool-request descriptions truncate by streaming (no full
Vec<char> of the payload); transport-error class shares one constant.
Docs/evals:
- architecture.md principle 4 + cross-build rows updated (CI landed).
- threat-model ENV-1 row now lists the real scrub set (_TOKEN,
PASSWORD included); JOB-2 row matches the post-triage read-only poll.
- evals Tier 2 runner: Python 3.9-compatible annotations, mkdtemp
session dirs cleaned, portable ISO timestamp, baseline diff keeps
improvements out of regressions and notes zero baselines.
- tests: jsonl tmpdir clears stale state, turn_loop asserts the abort
outcome instead of discarding it, cora_search timeout tests unix-
gated, evals_tier1 takes &Path, approver dead counter removed.
Dismissed with evidence (see PR body): gh read ops raw stdout, session
listing full replay cost, Ctrl-C summary skip, PID-recycling liveness,
PRD/epics historical risk-tier wording, architecture open-question
rows.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
All remaining MINOR/INFO findings from the 2026-09-18 full cora scan, fixed directly (maintainer call: no tracking issue). 19 files, includes one structural improvement and one new root-cause bug found by live E2E of this very sweep.
Why
The scan's deferred findings were real hygiene/correctness issues; fixing them now keeps the codebase scan-clean without a permanent findings ledger.
Changes
Provider wire:
scrub()no-op on empty secret; non-string tool_call arguments serialized instead of replaced with{}; one ureq agent per provider (connection reuse).NEW root-cause (live E2E):
write_filewas the ONLY registered tool without aspec()override — providers received a property-less schema and GLM legally answeredarguments: {}(every call failed 'missing path', loop guard tripped). Spec now declares path+content required; regression test pins the schema.CLI host: failed startups no longer leave a stray empty session file;
resume <id> "<prompt>"stores the memory summary; chat explicitly reports a dropped message after exhausted retries; session ids usestrip_suffix;binary_availablehonors exec bit/.exe; tole-cli is now lib+bin so approval_flow integration tests drive the REAL jailed tools + approver (scan's parity finding, fixed structurally).Core tools: edit_file approval line shows the actual old→new change; temp files unique per attempt + legacy stale sweep; delete_file on a symlink removes the LINK, not the referent; job_start kills the job if the pid file can't be written; MCP description truncation streams (no full payload copy); transport-error class shares one constant.
Docs/evals/tests: architecture principle 4 + cross-build rows current; threat-model ENV-1/JOB-2 rows match the code; Tier 2 runner Python 3.9-compatible + mkdtemp cleanup + portable timestamp + diff scope fixes; test hygiene (tmpdir clears stale state, abort outcome asserted not discarded, &Path, unix gating, dead counter removed).
Dismissed with evidence: gh read ops returning raw gh
--jsonstdout (the model parses it fine); session-listing full replay (correctness first, session counts small); Ctrl-C skipping the memory summary (no signal handler in scope; the session log itself is durable); PID-recycling false liveness (self-heals on next poll; job ids are per-session); PRD/epics historical risk-tier wording (point-in-time planning artifacts); architecture open-question rows (documented considerations, not defects).Testing