region HA 2b: the copy gate
The record already exists and is approved (389a9bfc). This adds the gate over it: inventory, no em dash, built rows approved, built rows applied. regionHA2bCopyBuilt starts empty; Tasks 2, 3, 7 and 9 extend it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+70
−0
approved_region_ha_2b_copy_test.go+70 −0
diff --git a/approved_region_ha_2b_copy_test.go b/approved_region_ha_2b_copy_test.go| new file mode 100644 |
| index 000000000..49cb88729 |
| --- /dev/null |
| +++ b/approved_region_ha_2b_copy_test.go |
| @@ -0,0 +1,70 @@ |
| +// approved_region_ha_2b_copy_test.go |
| +package main |
| + |
| +import ( |
| + "os" |
| + "regexp" |
| + "strconv" |
| + "testing" |
| +) |
| + |
| +// The copy gate of region HA plan 2b (Task 1), plan 2a's gate over plan |
| +// 2b's record. The record is a markdown table in the moves record's |
| +// format, read with the moves gate's parser and checked with the run |
| +// gate's helpers, so "approved" and "applied" mean what they mean there: |
| +// |
| +// - TestRegionHA2bCopyRecordIsComplete: the record names exactly |
| +// regionHA2bCopyIDs; |
| +// - TestRegionHA2bCopyHasNoEmDash; |
| +// - TestRegionHA2bBuiltCopyIsApproved: an id in regionHA2bCopyBuilt is an |
| +// approved row. No pending string reaches code, CLI help or docs; |
| +// - TestRegionHA2bBuiltCopyIsApplied: a built row's text is in the file |
| +// it names. |
| +const regionHA2bCopyRecordPath = "docs/superpowers/plans/2026-10-17-region-ha-2b-copy.md" |
| + |
| +var regionHA2bCopyIDPattern = regexp.MustCompile(`^RHB-C[0-9]+$`) |
| + |
| +// regionHA2bCopyIDs is the record's inventory, pinned: RHB-C1 to RHB-C64, |
| +// RHB-C67 and RHB-C68. RHB-C65 and RHB-C66 were withdrawn in review and |
| +// are not reused. |
| +var regionHA2bCopyIDs = func() []string { |
| + ids := make([]string, 0, 66) |
| + for i := 1; i <= 64; i++ { |
| + ids = append(ids, "RHB-C"+strconv.Itoa(i)) |
| + } |
| + return append(ids, "RHB-C67", "RHB-C68") |
| +}() |
| + |
| +// regionHA2bCopyBuilt is every id whose text the code or docs carry. The |
| +// task that writes a row's text adds its ids here in the same commit, once |
| +// Paul has approved the rows. |
| +var regionHA2bCopyBuilt = []string{} |
| + |
| +func mustParseRegionHA2bRecord(t *testing.T) []copyRow { |
| + t.Helper() |
| + raw, err := os.ReadFile(regionHA2bCopyRecordPath) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + rows, err := parseCopyTable(string(raw), regionHA2bCopyRecordPath, regionHA2bCopyIDPattern, "an RHB-C<n>") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return rows |
| +} |
| + |
| +func TestRegionHA2bCopyRecordIsComplete(t *testing.T) { |
| + reportAll(t, checkMovesInventory(mustParseRegionHA2bRecord(t), regionHA2bCopyIDs)) |
| +} |
| + |
| +func TestRegionHA2bCopyHasNoEmDash(t *testing.T) { |
| + reportAll(t, checkMovesNoEmDash(mustParseRegionHA2bRecord(t))) |
| +} |
| + |
| +func TestRegionHA2bBuiltCopyIsApproved(t *testing.T) { |
| + reportAll(t, checkRunBuilt(mustParseRegionHA2bRecord(t), regionHA2bCopyBuilt)) |
| +} |
| + |
| +func TestRegionHA2bBuiltCopyIsApplied(t *testing.T) { |
| + reportAll(t, checkRunApplied(builtRows(mustParseRegionHA2bRecord(t), regionHA2bCopyBuilt), ".")) |
| +} |