You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): run ids with a trailing newline fail validation #917
priority/p3-lowPriority P3: a small improvementscope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
find_run (ai/run_store.py:371) validates run_id with re.match(r"^[a-zA-Z0-9_\-\.]+$", run_id). $ also matches before a trailing newline, so "abc\n" passes and goes into the glob pattern */{run_id}*.json. The lookup only reads, and a newline can't reach outside the runs directory, so the effect is limited to a lookup that finds nothing. The validation still says less than it means.
Copilot's re-review of release PR #905 mentioned this in its summary, without a thread. #682 added the check in v0.2.24.
Acceptance criteria
The check uses re.fullmatch (or \Z), and a test asserts that find_run("abc\n") returns None without globbing.
Any other ^...$ validation of an identifier in src/ that uses re.match is checked the same way and listed in the PR.
uv run devops ci passes.
Update 2026-10-08: refinement
find_run is now get_run (ai/run_store.py:388-393) with the same check. The first criterion reads: get_run("abc\n") returns None without globbing. Other $-terminated checks include core/validation.py:641, :667, ai/mcp/server.py:143, :3249 and telemetry/memory_profiler.py:347-348; the PR lists which it changes.
priority/p3-lowPriority P3: a small improvementscope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Activity
chore(main): release 0.4.0 (#1960)