Migrate curriculum rig import to city.toml [[rigs]] (gc 1.2.1)#85
Draft
austinborn wants to merge 2 commits into
Draft
Migrate curriculum rig import to city.toml [[rigs]] (gc 1.2.1)#85austinborn wants to merge 2 commits into
austinborn wants to merge 2 commits into
Conversation
gc 1.2.1 rejects [defaults.rig.imports.factory] in pack.toml. Move the
active-lesson selection to the city.toml [[rigs]] block (the gc 1.2.1
target shape) as one coordinated change, so the curriculum's own linter,
snapshots, walkthroughs, templates, and docs all move together. A partial
migration breaks the repo's own checks, because the linter previously
required the old pattern.
- lesson-pack-lint.py: drop the SFI112 requirement for the legacy
pack.toml block; add SFI104 (city.toml must select a lesson via a
[[rigs]] factory import) and SFI114 (flag the legacy pack.toml block);
re-point the SFI501/SFI502 doc checks at the city.toml [[rigs]] shape;
fix the SFI103 hint.
- my-factory/{pack,city}.toml.template: move the factory import into the
city.toml [[rigs]] block.
- walkthrough-snapshots/L1/pack.toml: drop the legacy block.
- test-harness/walkthroughs/{L1,L2,L3,L4,C1}.sh: write/select the lesson
via city.toml [[rigs]]; replace the imperative gc rig import flow with a
declarative-config check.
- ~20 lab/capstone docs and READMEs: teach the city.toml [[rigs]]
selection instead of the old pack.toml block and gc --rig import flow.
Verified: lesson-pack-lint.py (L2..C1) and migration-check.sh pass; with
the templates copied to my-factory/{city,pack}.toml the lint is fully
clean. Not verified end-to-end against gc 1.2.1 (only 1.1.1 was available).
Generated by the operator's software factory.
City: factory-main · Agent: local-core.builder-2
On behalf of: @austinborn
Co-Authored-By: operator-factory-bot <factory-bot@operator-domain.invalid>
The new city.toml [[rigs]] block is rig-specific: name must match the rig gc
resolves, unlike the old rig-agnostic [defaults.rig.imports.factory] pattern.
The migration left name = "rig" hardcoded in the student-facing docs and the
template with no instruction to change it. A student whose rig is named after
their project basename would end up with an import that never binds to their
actual rig; the walkthroughs masked this because their scratch rig is literally
named "rig".
Changes:
- 16 student-facing docs (19 [[rigs]] blocks): name = "rig" -> name = "<rig>"
with an inline note pointing at `gc rig list`, matching the <rig> placeholder
already used for the sling targets and the reference-project exemplar.
- curriculum/labs/L2/README.md: fix the matching "the rig named rig" prose.
- my-factory/city.toml.template: keep name = "rig" as the working default (the
walkthrough harness copies it verbatim and binds it to a scratch rig named
"rig") and add a comment telling students to set name to their own rig.
Left unchanged: the reference-project/fired-up-pizza exemplar (already correct),
the test-harness walkthrough scripts, and the L1 city.toml snapshot (their rig
is genuinely "rig").
Verified: lesson-pack-lint.py (L2..C1) = 0 errors and migration-check.sh = all
invariants pass, with templates copied to my-factory/{city,pack}.toml. Not
verified end-to-end against gc 1.2.1 (only 1.1.1 available).
Generated by the operator's software factory.
City: factory-main · Agent: local-core.builder-1
On behalf of: @austinborn
Co-Authored-By: operator-factory-bot <factory-bot@operator-domain.invalid>
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
gc 1.2.1rejects[defaults.rig.imports.factory]inpack.toml. This migrates the Software Factory Intensive curriculum's active-lesson selection to thegc 1.2.1shape (a[[rigs]]block carrying[rigs.imports.factory]incity.toml) as one coordinated change, so the curriculum's own linter, snapshots, walkthroughs, templates, and docs all move together. A partial migration breaks the repo's own checks, because the linter previously required the old pattern.What changed
test-harness/lesson-pack-lint.py: dropped the SFI112 rule that required the legacypack.tomlblock. Added SFI104 (city config must select a lesson through a[[rigs]]factory import) and SFI114 (flags the legacypack.tomlblock if it lingers). Re-pointed the SFI501/SFI502 doc checks at the[[rigs]]shape and fixed the SFI103 hint.my-factory/{pack,city}.toml.template: moved the factory import out ofpack.tomland into thecity.toml[[rigs]]block.test-harness/walkthrough-snapshots/L1/pack.toml: dropped the legacy block (the matchingcity.tomlsnapshot was already on the new shape).test-harness/walkthroughs/{L1,L2,L3,L4,C1}.sh: the generatedcity.tomlnow carries the[[rigs]]block, and the imperativegc --rig rig import add/remove factorystep is replaced by a check that the import is declared incity.toml.my-factory/README.md, theactivities/andcurriculum/lab and capstone READMEs and PROMPTs, and the fired-up-pizza reference now teach editingcity.tomlinstead of runninggc --rig <rig> import.How to verify
Run from the repo root:
The linter reports only the two pre-existing
SFI100/SFI110findings, which fire because the gitignoredmy-factory/{city,pack}.tomlruntime copies do not exist on a fresh checkout. That matches the linter's behavior before this change. Copy the templates to real files (cp my-factory/pack.toml.template my-factory/pack.toml, same forcity.toml) and the linter is fully clean, with zero findings.migration-check.shpasses every structural invariant.Not verified: gc 1.2.1 runtime
Only
gc 1.1.1was available in the build environment, and1.1.1does not understand the[[rigs]]city.tomlshape, so the walkthrough scripts' livegc registerandgc rig addbehavior undergc 1.2.1was not exercised. The gc-independent checks above all pass. Confirm the walkthroughs against a realgc 1.2.1before relying on them.Open question for review
The
[[rigs]]block declares a rigname, whilegc rig add <dir>derives the rig name from the directory's basename. The generic templates and curriculum usename = "rig"(matching the committedL1/city.tomlsnapshot and the walkthrough'srig/directory); the fired-up-pizza reference usesname = "fired-up-pizza". Whether the[[rigs]] namemust match thegc rig addbasename, and whether[[rigs]]needs adirfield pointing at the project, both need confirmation ongc 1.2.1.Test plan
lesson-pack-lint.py --lesson L2..C1is clean except the pre-existing SFI100/SFI110migration-check.shpassesgc 1.2.1, a walkthrough (e.g.test-harness/walkthroughs/L2.sh) registers the city and resolves the factory import fromcity.toml