Skip to content

Guard unscoped side-agent refresh-state runs#789

Open
huangruiteng wants to merge 4 commits into
mainfrom
codex/refresh-state-agent-lane-inference
Open

Guard unscoped side-agent refresh-state runs#789
huangruiteng wants to merge 4 commits into
mainfrom
codex/refresh-state-agent-lane-inference

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • infer agent-lane scope when an unscoped refresh-state recommended action references a todo claimed by a non-primary registered agent
  • also infer agent-lane scope when the action text references a non-primary registered agent token, covering side-agent handoff/status text that points primary review back to the controller
  • reject inferred non-primary agent-lane runs that try to update durable ## Next Action without an explicit primary-agent route
  • extend the agent-lane refresh smoke to cover unscoped side todo refreshes and side-agent review handoff text without stealing latest_status_run

Validation

  • git diff --check
  • python3 examples/refresh-state-agent-lane-scope-smoke.py
  • python3 examples/work-lane-contract-smoke.py
  • python3 examples/status-markdown-smoke.py
  • python3 examples/next-action-projection-contract-smoke.py
  • python3 -m py_compile loopx/state_refresh.py examples/refresh-state-agent-lane-scope-smoke.py

@huangruiteng huangruiteng force-pushed the codex/refresh-state-agent-lane-inference branch from 0e6f936 to 4e63fff Compare June 27, 2026 18:27
@huangruiteng

Copy link
Copy Markdown
Owner Author

Findings:

  • [P1] The PR is currently not mergeable: GitHub reports mergeStateStatus=DIRTY and mergeable=CONFLICTING. Please rebase/resolve against current main, then rerun the refresh-state scope smoke before merge.

Open questions / assumptions: I treated this as a control-plane guard for non-primary agent refresh-state writes. The intended behavior is to infer a side-agent scope only from claimed todo text/id, reject ambiguous text-only agent mentions without explicit --agent-id, and prevent non-primary agents from updating the durable global Next Action.

Validation performed on the PR head before conflict resolution:

  • python3 examples/refresh-state-agent-lane-scope-smoke.py passed.

Merge decision: hold until the branch conflict is resolved and the focused smoke is rerun on the rebased head.

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.

1 participant