Repository navigation
feat(loop): two-hourly cadence, nightly survey, stock ceilings, no pins - #10
Merged
Merged
Conversation
Four changes shipped together because they are one design move: make runs small and frequent, and make everything once-a-day live in one nightly run. The routines split by function instead of time of day. sydevs-loop runs rungs 0-4+6 every two hours through the Vancouver working day; sydevs-survey-nightly runs rung 5, the reconciliation sweeps, and the journal once at 1am. The split fixes a starvation bug: as a rung below merge/revise/implement, the survey could be starved for days by a busy queue with nothing looking wrong. Monday's run proved the pressure — both flow ceilings hit their caps and five items rolled over on a 12-hour cadence. The flow ceilings are retired for exactly that cadence change: a per-run quota silently multiplies by the schedule, so maxImplementationsPerRun, maxPrRevisionsPerRun, maxTicketRepliesPerRun and maxHumanPrReviewsPerRun go. What remains is stock caps (wipCapPerRepo bounds implementations, maxOpenProposals bounds proposals) plus one backstop, maxWorkItemsPerRun: 3, so a 30-item queue cannot burn a whole run. The rule is recorded in the config comment: a stock cap survives a cadence change; a flow cap does not. The nightly run gains the dropped-baton sweep (reviewer replied but kept the baton -> flag in the journal, never pick up, hold excluded) and the stale-claim sweep (claude:working older than an hour is a crashed run's residue). Both are once-a-day by nature - in the two-hourly loop they would re-flag the same items on every pass. Journal pinning is removed entirely. pinIssue is GraphQL-only and a routine's GraphQL serves only PR-review operations, so the loop cannot pin and a stale pin is worse than none. Recency surfaces the current journal on its own. Also corrects the <details> record with what two runs' contradictory evidence finally resolved: writes store the tags intact (REST proves it), but the MCP READ path strips details/summary while keeping table, sub and a - so a run verifying its own write via MCP readback will wrongly conclude the write failed. From a routine the faithful readback does not exist; trust the write's 200. And documents the working Postgres bring-up for the routine environment, validated by SahajCloud#663's investigation: the image ships Postgres 16 off $PATH with no cluster; initdb + pg_ctl as the postgres user yields exactly DEFAULT_TEST_DATABASE_URL and the integration lane runs unmodified - 67 files, 1135 tests, green. Co-Authored-By: Claude Opus 5 <[email protected]>
9 tasks
This was referenced Sep 3, 2026
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sydevs-loopevery 2h through the working day (rungs 0–4, 6),sydevs-survey-nightlyonce at 1am PT (rung 5 + reconciliation sweeps + journal)wipCapPerRepobounds implementations,maxWorkItemsPerRun: 3is the per-run backstop<details>record: the MCP read path strips the tags — writes are intactChanges
workflow/skills/loop-run/SKILL.md— RUN_KINDloop|nightly; ceilings recounted againstmaxWorkItemsPerRun; nightly reconciliation section; pin step removed;<details>section rewrittenloop-config.json— flow ceilings deleted,maxWorkItemsPerRunadded, stock-vs-flow rule in the comment; journal pin keys removeddocs/routine-setup.md— working setup script (initdb aspostgres,--auth=trust), daily-journal section, new routines table, corrected<details>failure-mode rowworkflow/skills/reflect/SKILL.md,README.md— cadence proseContract impact
Changes both routine prompts and schedules — applied via
RemoteTriggerafter this merges. The environment setup script must be updated by hand in the claude.ai UI; the exact script is indocs/routine-setup.md§4.Test results
claude plugin validate ./workflow --strictpassesManual verification
Notes for reviewer
Evidence for retiring the flow caps: Monday's run hit implementations 1/1 and PR revisions 2/2 with five items rolling over at a 12-hour cadence — the queue was growing faster than it drained, and the caps were denominated in a unit (per run) that the cadence change redefines.