fix(learning-room): seed peer simulation artifacts during progression#238
Conversation
… progression Challenges 1-13 tell students to comment on, review, or compare with the seeded 'Peer Simulation: Welcome Link Needs Context' issue and the 'Peer Simulation: Improve contribution guidance' pull request. Those artifacts were created by scripts/classroom/Seed-PeerSimulation.ps1, which was deleted in the GitHub Classroom removal (c567eb7) without moving the behavior into hybrid provisioning, so every provisioned room was missing them (support issue Community-Access/support#58). The learning room progression script now seeds all peer simulation artifacts (labels, both issues, the peer-simulation/review-pr branch with docs/samples/peer-review-practice.md, and the PR) idempotently on every progression run, so new rooms get them at Challenge 1 seed time and existing rooms self-repair on their next challenge close. Seeding failures log a warning instead of failing progression. The student-progression workflow gains pull-requests: write for the PR creation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Learning Room Validation ReportGreat work. Your changes look good. Resources |
|
Hi! I am Gandalf, your workshop agent. I bring a little magic to make this interaction clear, helpful, and fun. Here is my review of your pull request: Report StatusValidation Needs Attention [ACTION REQUIRED] Required Checks
Learning ResourcesBased on your changes, these guides might help: Automated validation by Learning Room Bot. Gandalf generated this review. Last updated: 2026-07-04T16:53:13.520Z |
Progress UpdateGreat work, @accesswatch! Current Level: Explorer Available Challenges:
Keep going! |
Peer Review AssignedHi @accesswatch! Your PR has been automatically paired with @taylorarndt for peer review. For @taylorarndt:This is a great opportunity to practice code review skills! Here's what to look for: Content Quality:
Accessibility:
Documentation:
Review Guidelines:
Resources: Pairing by Learning Room Grouping Engine |
There was a problem hiding this comment.
Pull request overview
Adds automatic, idempotent seeding of “peer simulation” artifacts (labels, issues, branch + practice file, and a PR) into learning rooms so challenge instructions consistently reference real resources, including self-repair for rooms already in progress.
Changes:
- Adds
ensurePeerSimulationArtifacts()tochallenge-progression.jsand runs it before creating the next challenge issue. - Expands the progression workflow token permissions to allow opening the seeded PR.
- Introduces regression tests covering seeding, idempotence, and non-blocking failure behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| learning-room/.github/workflows/student-progression.yml | Grants pull-requests: write so the workflow can create the seeded peer simulation PR. |
| learning-room/.github/scripts/challenge-progression.js | Implements idempotent seeding/repair of peer simulation labels/issues/branch/file/PR during progression. |
| .github/scripts/tests/challenge-progression-peer-simulation.test.js | Adds automated tests verifying seeding behavior, idempotence, and graceful failure. |
| } catch (error) { | ||
| if (/already_exists|422/.test(error.message)) { | ||
| log('DEBUG', `Label ${label.name} already exists.`); | ||
| return; | ||
| } | ||
| throw error; | ||
| } |
| try { | ||
| await request(`/repos/${owner}/${repo}/git/ref/heads/${encodeURIComponent(PEER_SIM_BRANCH)}`, {}, 1); | ||
| log('DEBUG', `Branch ${PEER_SIM_BRANCH} already exists.`); | ||
| } catch (error) { | ||
| const mainRef = await request(`/repos/${owner}/${repo}/git/ref/heads/main`, {}, 1); | ||
| await request(`/repos/${owner}/${repo}/git/refs`, { | ||
| method: 'POST', | ||
| body: { ref: `refs/heads/${PEER_SIM_BRANCH}`, sha: mainRef.object.sha } | ||
| }); | ||
| log('INFO', `Created branch ${PEER_SIM_BRANCH}.`); | ||
| } |
| try { | ||
| await request(`/repos/${owner}/${repo}/contents/${PEER_SIM_FILE}?ref=${encodeURIComponent(PEER_SIM_BRANCH)}`, {}, 1); | ||
| log('DEBUG', `${PEER_SIM_FILE} already exists on ${PEER_SIM_BRANCH}.`); | ||
| return; | ||
| } catch (error) { | ||
| log('DEBUG', `${PEER_SIM_FILE} not found on ${PEER_SIM_BRANCH}; creating it.`); | ||
| } |
Summary
Support issue Community-Access/support#58 (Debee Armstrong): Challenge 3 tells students to open the Peer Simulation: Welcome Link Needs Context issue and filter by the
peer-simulationlabel, but no such issue exists in provisioned learning rooms.Root cause: the peer simulation artifacts (two issues, the
peer-simulation/review-prbranch withdocs/samples/peer-review-practice.md, and the Peer Simulation: Improve contribution guidance PR) were created byscripts/classroom/Seed-PeerSimulation.ps1. That script was deleted in the GitHub Classroom removal (c567eb7) without moving its behavior into hybrid provisioning. Challenges 1, 2, 3, and 8 reference the issue; challenges 4, 5, 6, 9, 10, 11, 12, 13, and Bonus E reference the PR or its commits. All of them were pointing at nothing.Changes
learning-room/.github/scripts/challenge-progression.js: idempotentensurePeerSimulationArtifacts()(labels, both issues, branch + practice file, PR) runs before every challenge issue is created. New rooms get everything at Challenge 1 seed time (provisioning runs this script); rooms already in flight self-repair on their next challenge close. Failures log a warning instead of blocking progression.learning-room/.github/workflows/student-progression.yml: addspull-requests: writeso the workflow can open the seeded PR..github/scripts/__tests__/challenge-progression-peer-simulation.test.js: regression tests for seeding, idempotence, and graceful failure.Tests
npm run test:automation: 87 passnpm run test:provisioning: 80 passGenerated with Claude Code