Skip to content

WEB-6954: Route memory-fix in the discovery binary - #451

Merged
anonpran merged 1 commit into
stagingfrom
web-6954-memory-fix-entry
Nov 27, 2026
Merged

anonpran merged 1 commit into
stagingfrom
web-6954-memory-fix-entry

Conversation

@anonpran

@anonpran anonpran commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Teaches the packaged discovery binary one more first argument, memory-fix, for Fix It on memory files.
  • The daily root run must edit a user's memory file as that user, with no API key. A packaged binary cannot run a helper script, so the agent starts itself again as the user with this argument.

Changes

Change File
unbound-discovery memory-fix calls coding_discovery_tools.memory_fix_helper.main() and returns its exit code. It is handled before the "no config, idle, exit 0" branch, because the helper runs with an empty environment. The entry writes nothing to stdout on this path. packaging/unbound_discovery_entry.py
Exit 3 when this bundle has no helper module, exit 1 when the helper or its import crashes. same
Five contract tests for the route. binary/tests/test_frozen_contract.py

Notes for review

  • Safe to ship before the agent change: until the helper is on the agent's main, the route answers 3 and the agent never claims it can fix.
  • packaging/unbound-discovery.spec already bundles every coding_discovery_tools submodule, so no spec change.
  • No version bump here; this repo bumps the runtime in its own commits.
  • Release order: this PR, then the agent PR to its main, then a runtime release (discovery.lock builds the agent from main).

Pairs with websentry-ai/ai-gateway-data#3587 and websentry-ai/coding-discovery-tool#441. Merge this before the agent PR.

Linear: WEB-6954

🤖 Generated with Claude Code

Unbound Review · Score 5/5 (no findings) · 50d4a8e

  • codex (own score 5/5): The PR routes the discovery binary’s memory-fix subcommand to the helper before configuration checks and adds tests for its exit behavior. The route and packaging configuration appear consistent with the stated contract; I found no actionable defects.
  • claude (own score 5/5): The PR adds a memory-fix route to the discovery binary's entry point. The route is handled before the no-config idle branch. It returns 3 when the bundle has no helper module and 1 when the import or the helper crashes, and it logs only to stderr. I checked the import-error handling against Python's import machinery and the five tests against the code paths they claim to cover; both hold up. The canonical spec already pulls in every `coding_dis

findings: 0 P0 · 0 P1 · 0 P2 (top 5 P0/P1 inline) · engines: codex ✅ · claude ✅

…fixer (WEB-6954)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@vigneshsubbiah16 vigneshsubbiah16 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ Security consensus: no issues found. (reviewers: Claude lead review, Semgrep, Gitleaks)


🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head 50d4a8e7 · 2026-11-27T09:32Z

@anonpran
anonpran merged commit c6ff297 into staging Nov 27, 2026
5 checks passed
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.

3 participants