improve scheduled work-plan task coverage handling - #60
Merged
Conversation
✅ Deploy Preview for pirog-boot-me ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
list_threads(limit=50)entrypoint,bounded recovery, capped-result handling, exact task reads, and a pre-mutation safety boundary
outcomes while routing GitHub and Codex mechanics to their owning references
Codex commitment coverage without pretending capacity or duplicate coverage is complete
exact target read immediately before every archival attempt
metadata read is needed
Incident evidence
On 2026-08-27, Daily Work Plan and the unmanaged Vacation Daily Work Plan both authenticated GitHub
successfully through the native connector and direct
ghreads. They failed only after first tryingthe invalid
list_threads(limit=100), correcting to 50, receiving the valid supported maximum withno cursor, total, or completeness marker, repeating that identical capped result, and hard-stopping
before producing a plan.
Morning Closeout received the same capped listing and completed safely because its owning workflow
treated it as incomplete-but-usable evidence. It retained one dirty, detached, unreferenced worktree
instead of archiving it.
The existing restricted-network GitHub recovery in
references/github-read-access.mdremains intactand is now invoked lazily. The implementation also follows OpenAI's current guidance to keep prompts
lean, state instructions once, and define bounded retries and safety boundaries:
https://developers.openai.com/api/docs/guides/latest-model
Behavior and safety
ambiguity gets bounded correction or recovery
unavailable optional provider permits only the independent read-only work owned by the caller
untrustworthy final data, failed exact target reads before mutation, or ambiguous/destructive target
safety still stops at the owning boundary
unknown remaining/total capacity, and recommends at most one issue
recommendation and never claims that no active commitment exists
fresh exact target read before archival
Validation
bun run automations:validate: passedbun run test: 125 passingbun run lint: passedgit diff --check: passedbun run codex:validate: passedThe incident scenarios in
test/automation-manifest.spec.jsare static prompt/runbook contract checksplus real manifest composition; they are not a simulation of Codex runtime pagination or archival.
Leia,
bun run build,ai:sync, and the installed-cachecodex:check/codex:sync/codex:checkcycle were intentionally skipped because this change does not authorize those mutation or release
surfaces.
Risk and tradeoff
Partial task coverage can still hide an existing commitment. The design makes that uncertainty
visible, limits degraded recommendations to one issue, refuses exact capacity arithmetic, and blocks
later task creation until stronger duplicate verification succeeds. This trades plan completeness for
a useful conditional result without weakening mutation safety.
Vacation Daily Work Plan follow-up
Vacation Daily Work Plan is intentionally unmanaged and is not added to
AUTOMATIONS.yamlor changedby this PR. After merge and an approved cache sync, its live prompt needs a separately approved update
to use the same simplified preflight and Codex Task Access behavior.