Run an hourly deterministic development watchdog before dispatching CoS agents
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start with the existing detectors and workflows in server/services/perpetualWork.js, server/services/issueReconcile.js, and server/services/prWatcher.js, then review the dependency on #7818. Trace how scheduled, wake, and manual dispatch currently share ownership and merge gates. Done means the listed zero-inference, concurrency, recovery, pagination, and public-boundary test cases are covered without duplicating existing workflows.
Written by the indexing model from the issue text.
Description
Problem and evidence
Existing building blocks are fragmented: server/services/perpetualWork.js:257,841 detect claimable work; server/services/issueReconcile.js:572,636,678 gather ownership and release abandoned claims; server/services/prWatcher.js:329,458 already handle pending merges without an agent. PR discovery at prWatcher.js:499-585 uses changed activity and a first-run baseline, which is not a complete invariant that every open PR has an accountable state. Merely enabling a watcher does not establish hourly maintenance or active-agent ownership.
Chosen approach
Register an opt-in programmatic scheduled task with a configurable hourly default and Run Now/dry-run. Reuse existing detectors, reconciliation and merge gates instead of writing another issue selector or merge implementation. Produce one structured snapshot/receipt with source freshness and completeness, available slots, eligible backlog, all open PR dispositions and work decisions. Classify PRs as actively owned, queued for resolution, waiting for CI/review, draft, blocked with reason, untrusted/excluded, or unknown. Revisit old unchanged PRs as well as newly observed activity.
Use the same ownership decision for queued/running/finalizing agents, external claim evidence and reachable peers. Unknown or unavailable peer/forge state is not proof that work is abandoned. Acquire durable per-repository/work-item dispatch ownership shared with existing schedulers and wake requests; revalidate immediately before queueing or merging. Include head SHA in review/merge state, and do not respawn repeatedly for unchanged failed/blocked evidence.
Acceptance criteria
- Empty, already-owned, pending-CI and unchanged-blocked scans use zero LLM calls and spawn zero agents.
- Eligible unclaimed work with capacity queues the existing claim workflow; honor labels, dependency state, active claims, cooldowns, provider budgets and project/global capacity.
- An eligible orphan PR uses the existing resolve/review/merge workflow; deterministic merge is allowed only under existing explicit merge authority and current-head full review/CI gates. Never turn an arbitrary orphan PR into merge-only work.
- Concurrent hourly/wake/manual scans and process restarts do not duplicate tasks or steal live claims; partial pagination, auth failures and unreachable peers report unknown and defer mutation.
- Persist bounded decision receipts and explicit blockers; normal lifecycle outcomes use Brain/actionable status, reserving notifications for user decisions.
- Public-boundary tests cover scan-to-dispatch, competing scans, restart recovery, changed heads, blocked dependency PRs, partial reads, disable and no-op zero-inference behavior.
Dispatch: heavy capability for cross-scheduler races and ownership; high effort for recovery and integration contracts.
Blocked by #7818
Planning scope: issue-only investigation; no implementation or instance configuration was changed. Public examples must be synthetic; do not publish live prompts, transcripts, machine identity, or personal records.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 50m
- Merged PRs (30d)
- 985
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
blocked effort:high enhancement model:medium plan
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
blocked effort:high enhancement model:heavy plan
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
blocked effort:high enhancement model:medium plan
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
effort:high enhancement in-progress model:heavy plan
-
effort:high enhancement help wanted model:heavy plan planner:gpt-6-astra
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in atomantic/PortOS
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100