Repository navigation
fix(loop): the journal pointer is an optimisation, not a precondition - #76
Merged
Merged
Conversation
The second live dispatch died on `POST /repos/.../issues` — 403 while creating the day's journal issue, before the fire. `ensureJournalDay` now never throws: it returns 0, `payload.mjs` accepts 0, and handler-journal finds or creates the day itself, as cron mode already does. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Follow-on to #75, same class of bug, found by the next live dispatch on claude-workflow#72:
The dispatcher creates the day's journal issue so it can name it in the record, and it does that before the fire. So one missing token permission stopped the work again — the board fix from #75 held, and the run died one step later.
The fix
ensureJournalDaynever throws. It returns{ number: 0, failed }when it cannot list or create.payload.mjsacceptsjournal.issue: 0and reportsjournalKnown: false.handler-journaltreats 0 as "find or create today's issue yourself" — the path the nightly survey already takes with no record at all — and journals the fact under🧭 Friction.postAnomalyandrefreshTallyno-op on 0 instead of posting to issue zero.docs/why.md#the-journal-pointer-is-an-optimisation, which states the general rule: the fire is the work, everything else is bookkeeping, and bookkeeping that fails should be visible without being fatal.journal.issue0 vs -1. 55 pass. Rule delta clean.The token still needs fixing, and it is now the only blocker
Two live dispatches have each found one more thing
SYDEVS_BOT_PATcannot do:projectV2(number: 2)null— no organization Projects accessPOST /repos/sydevs/claude-workflow/issuesResource not accessible by personal access tokenCreating an issue needs Issues: write, which is the same permission every label and comment write needs — so the dispatcher cannot lock an item either, and a session that finds no
bot:workinglabel stops on arrival by design. Grant the fine-grained PAT Issues: read and write, Pull requests: read and write, Contents: read and write (the merge needs it), and organization Projects: read and write.claude-workflowis back onBOT_DISPATCH=dryuntil then.