Skip to content

fix(company-os): a control's Redis flag follows its activity write (#20150) - #20532

Merged
mrveiss merged 2 commits into
mainfrom
issue-20150-pause-order
Nov 1, 2026
Merged

mrveiss merged 2 commits into
mainfrom
issue-20150-pause-order

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Refs #20150

Thinking Path

The pause route wrote its Redis flag before the activity write. When that write failed, the request answered 500 and rolled back while the flag stayed, so the agent was stopped with the database saying it wasn't. The database is the authority, so the flag has to follow it.

What Changed

  • llc/services/controls_service.py: every control now sets or clears its Redis flag after the activity write: pause, resume and terminate for agents, and the two others in that file with the same order. The class gets a line saying so.
  • llc/tests/test_controls.py: a failed activity write changes no flag, for pause, terminate and resume.

A failure between the flag and the route's commit is still possible, since the commit belongs to the caller. It is narrower than before, and the flag is best-effort by design.

Verification

  • test_controls.py and test_controls_slug_19587.py passed by name; output in the review.

Not established: criterion 1 of #20150, that pause and resume succeed through the API against real Postgres. That is the end-to-end test's step 7 in CI, so this PR only Refs the issue.

Model Used

Claude Opus 5.5

🤖 Generated with Claude Code

@mrveiss mrveiss added this to the M2 - Company OS workflow-ready milestone Nov 1, 2026
@mrveiss mrveiss added the phase:M2.7 Approvals and board controls take effect label Nov 1, 2026
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 25ab945 and c51286f.

Files selected for processing: 2
  • autobot-backend/llc/services/controls_service.py
  • autobot-backend/llc/tests/test_controls.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Code review on PR #20532 (head dc45b2a): approve.

Read only; I didn't run the tests. Flags now follow the activity write on all six controls, so a failed write leaves nothing behind, and the status change rolls back with it. Two things to weigh, neither blocking:

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss
mrveiss merged commit 4c1b37d into main Nov 1, 2026
5 checks passed
mrveiss added a commit that referenced this pull request Nov 1, 2026
@mrveiss
mrveiss deleted the issue-20150-pause-order branch November 1, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

phase:M2.7 Approvals and board controls take effect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant