Repository navigation
Add --resume to populate-term-board and tolerate board auto-add races - #2130
Merged
nate-double-u merged 5 commits intoAug 25, 2026
Merged
Conversation
A board copied from a previous term can carry enabled built-in workflows; "Auto-add sub-issues to project" races the tool's own board adds and failed a mid-run production populate. Recover the existing board item when an add reports the content already exists, and add a --resume flag that continues an interrupted run from its manifest: recorded issues are skipped, the last recorded one is re-verified (nest, board card, fields), and the rest are created as usual. Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Nate W <natew@cncf.io>
Add the repo and project board URL used to populate the term admin board, so the config documents where the term's issues live. Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Nate W <natew@cncf.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds resumable board population and recovery from project auto-add races.
Changes:
- Adds
--resumewith manifest-based recovery. - Recovers existing project item IDs after auto-add races.
- Updates tests, documentation, and 2027 Term 1 configuration.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
ADMIN_GUIDE.md |
Documents resume behavior and board workflow caveats. |
bin/populate-term-board.js |
Implements --resume orchestration. |
lib/gh-client.js |
Adds issue lookup and board-race recovery. |
lib/populate.js |
Adds manifest-driven resume logic. |
terms/2027-t1.yml |
Records repository and project board. |
test/gh-client.test.js |
Tests client recovery and lookup methods. |
test/populate.test.js |
Tests resume scenarios and summaries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address review feedback: the resume path matched manifest records to plan items by title alone, so a reordered parent, changed schedule_key, or edited schedule date could pass verification and mix old and new plans. Record parentNumber, scheduleKey, start, and due with each created issue and verify all of them against the current plan on resume, refusing with a field-specific message on any mismatch. Records without these fields (manifests from earlier runs) skip the extra checks and remain valid. Recording moves from the bin's client wrapper into populateTerm via an onCreated callback, still invoked the instant an issue is created so a later crash cannot lose it. Pre-order is now checked before creating an issue, so a malformed plan no longer creates an orphan first. Also note in the admin guide that copying a project board does not carry its repository links, so a new board must be linked to appear on the repo's Projects tab. Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Nate W <natew@cncf.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
programs/lfx-mentorship/automation/lib/populate.js:76
- The compatibility check only covers records already in the manifest, so edits to the unrecorded suffix are invisible. After an interruption, changing the next issue's title,
schedule_key, parent, or adding/removing later issues still resumes and creates the revised plan, despite the stated guarantee that a changed plan is rejected. Persist a fingerprint of the complete plan and resolved schedule before creation starts, then compare it before skipping any records.
completed.forEach((rec, i) => {
Address review feedback on the create/record gap: a create can succeed remotely while the response is lost or the process dies before the manifest write, leaving an issue the manifest does not know about. A resume would then create a duplicate. Before creating the first unrecorded plan item, resume now queries the repo for an issue matching it (exact title, the item's full label set, any state) that is missing from the manifest. If one exists, the run refuses and prints a ready-to-paste manifest line; appending it makes the next resume adopt and repair the issue through the existing re-verification path. Closing the stray instead also works. Recorded issues and same-titled items elsewhere in the plan are excluded by number, so in-plan duplicate titles (two Approve stipends items) do not trip the check. Fresh runs and complete manifests skip it entirely. Also reword the resume guarantees where they overclaimed: the recorded prefix is verified field-by-field, while unrecorded items are created from the current files exactly as a fresh run would, so editing not-yet-created issues between runs is allowed by design. Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Nate W <natew@cncf.io>
Address review feedback: the gap check queried state=all, but its own recovery instruction is to close the stray issue and re-run, which would have matched the closed issue again and refused forever. Search open issues only, so closing a stray actually clears the check. A closed bare stray has no nesting or board card and is harmless residue. Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Nate W <natew@cncf.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
programs/lfx-mentorship/automation/lib/populate.js:110
- The create/record gap is still unhandled for the first plan item. If GitHub creates item 0 but its response is lost (or the first manifest append fails),
completedis empty, so this reconciliation is skipped; the CLI also rejects--resumewhen the manifest is absent or empty. A normal rerun then hits the double-run guard, while--forcecreates a duplicate. Pass an explicit resume intent, allow an empty manifest/marker, and run this stray check againstplan[0]in that case.
if (completed.length > 0 && completed.length < plan.length) {
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.
Dogfooding populate-term-board.js on the real 2027 Term 1 setup surfaced two failure modes; this hardens both.
What happened
Populating board 98 failed at issue 35 of 62: the board (copied from the 2026 Term 3 board) carried over the enabled "Auto-add sub-issues to project" built-in workflow, which added the freshly nested issue to the board before the tool's own add, failing the run with
Content already exists in this project.Changes
projectItems) and continue - a lost race is no longer a failed run--resumeflag: continue an interrupted run from its manifest - recorded issues are skipped, the last recorded one is re-verified idempotently (nest, board card, fields - the crash window), and the rest are created as usual; refuses to resume if the plan no longer matches the manifestrepoandprojectboard URL used for the populate runVerified in production:
--resumecompleted the interrupted 2027 Term 1 run (27 created, 1 re-verified, 62 total on the board). Tests: 603 pass.