Skip to content

fix(learning-room): seed peer simulation artifacts during progression#238

Merged
accesswatch merged 1 commit into
mainfrom
fix/seed-peer-simulation-artifacts
Jul 4, 2026
Merged

fix(learning-room): seed peer simulation artifacts during progression#238
accesswatch merged 1 commit into
mainfrom
fix/seed-peer-simulation-artifacts

Conversation

@accesswatch

Copy link
Copy Markdown
Collaborator

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-simulation label, but no such issue exists in provisioned learning rooms.

Root cause: the peer simulation artifacts (two issues, the peer-simulation/review-pr branch with docs/samples/peer-review-practice.md, and the Peer Simulation: Improve contribution guidance PR) were created by scripts/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: idempotent ensurePeerSimulationArtifacts() (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: adds pull-requests: write so 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 pass
  • npm run test:provisioning: 80 pass

Generated with Claude Code

… 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>
@accesswatch
accesswatch requested a review from taylorarndt as a code owner July 4, 2026 16:52
Copilot AI review requested due to automatic review settings July 4, 2026 16:52
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Learning Room Validation Report

Great work. Your changes look good.

Resources

@accesswatch
accesswatch merged commit c239b47 into main Jul 4, 2026
10 checks passed
@accesswatch
accesswatch deleted the fix/seed-peer-simulation-artifacts branch July 4, 2026 16:53
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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 Status

Validation Needs Attention [ACTION REQUIRED]

Required Checks

  • Issue Reference
    PR should reference the issue it addresses (e.g., "Closes #12")
    Add "Closes #XX" to your PR description to automatically close the issue when merged. Learn more: docs/04-working-with-issues.md

  • PR Description

  • File Location
    Changes should be in learning-room/ directory only
    Student contributions should modify files in learning-room/docs/ only. Other directories are workshop infrastructure.

Learning Resources

Based 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
Questions? Check PR Guidelines or mention @Facilitator

@github-actions github-actions Bot added documentation Improvements or additions to documentation needs-work labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Progress Update

Great work, @accesswatch!

Current Level: Explorer
Merged PRs: 29
Next Level: Contributor (NaN more merged PRs)

Available Challenges:

  • 01 Scavenger Hunt
  • 02 First Issue
  • 03 Join Conversation

Keep going!

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Peer Review Assigned

Hi @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:

  • Does the change accomplish what the issue describes?
  • Is the writing clear and helpful?
  • Are there any typos or grammar issues?

Accessibility:

  • Proper heading hierarchy (H1 → H2 → H3, no skips)?
  • Descriptive link text (not "click here")?
  • Alt text on images?
  • [TODO] markers removed?

Documentation:

  • Code blocks are properly formatted?
  • Tables have headers?
  • References/links work correctly?

Review Guidelines:

  • Be kind and constructive
  • Suggest improvements, don't just point out problems
  • Ask questions if something is unclear
  • Approve when ready or request changes with explanation

Resources:


Pairing by Learning Room Grouping Engine

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() to challenge-progression.js and 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.

Comment on lines +429 to +435
} catch (error) {
if (/already_exists|422/.test(error.message)) {
log('DEBUG', `Label ${label.name} already exists.`);
return;
}
throw error;
}
Comment on lines +454 to +464
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}.`);
}
Comment on lines +466 to +472
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.`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants