Repository navigation
refactor(sections): move the plan lockstep types beside KeyErasedPlan and name FamilyPlan KeyedPlan - #467
Merged
Conversation
Contributor
File size check0 over a hard cap (fails), 10 warning(s).
Split the file, wrap the line, shorten or exempt the comment, or list the path in 5 managed file(s) skipped; repo-platform owns them. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The type-only move and rename are complete and preserve the existing lockstep behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Moves shared plan lockstep types into the plan contract and renames FamilyPlan to KeyedPlan.
Changes:
- Relocates plan type utilities beside
KeyErasedPlan. - Updates three section factories to import and use
KeyedPlan. - Removes obsolete plan types from
keyed-values.ts.
| File | Description |
|---|---|
src/sections/contract/plan.ts |
Defines the relocated plan types and makes KeyErasedPlan private. |
src/sections/shared/keyed-values.ts |
Removes relocated types and updates module documentation. |
src/sections/shared/repo-secrets.ts |
Uses plan types from the contract module. |
src/sections/shared/repo-variables.ts |
Uses plan types from the contract module. |
src/sections/shared/setup-section.ts |
Renames FamilyPlan usage to KeyedPlan. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… and name FamilyPlan KeyedPlan FamilyPlan, WidePlan, WidePlanAt, Invariant, and PlanMisfits lived in src/sections/shared/keyed-values.ts, the secrets and variables family scaffolding, and the setup factory in setup-section.ts had to import a "Family" vocabulary from a family module to prove its one plan the same way. The five types now sit after KeyErasedPlan in src/sections/contract/plan.ts, the module that already owns PlanContext, PlannedOp, SectionPlan, and the key-erasure the lockstep compares through. FamilyPlan is renamed KeyedPlan: one section's plan() under its own key brand, the counterpart KeyErasedPlan strips. The other four keep their names and bodies. keyed-values.ts keeps no re-export and drops the imports only the moved types used. repo-secrets.ts, repo-variables.ts, and setup-section.ts import the three public types from the contract. KeyErasedPlan loses its export keyword since nothing outside plan.ts reads it now.
Vivswan
force-pushed
the
refactor/plan-lockstep-home
branch
from
October 5, 2026 10:58
2aa0a4b to
9701725
Compare
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.
What this changes
A pure move with one rename. The setup factory is not a family, yet it imported a "Family" vocabulary from the secrets and variables module.
How
shared/keyed-values.tstocontract/plan.ts, right afterKeyErasedPlan, the erasure they compare through.FamilyPlanbecomesKeyedPlan: one section's plan() under its own key brand, the counterpartKeyErasedPlanstrips.keyed-values.tskeeps no re-export.KeyErasedPlanturns private since nothing outsideplan.tsreads it now.Proof
PlanMisfits(a mismatched Table, an extra GET role) fail on the pin and pass once restored.tsc, biome,lint:arch, knip clean.Technical details
KeyedPlan: body identical toFamilyPlan, name and doc comment changed.WidePlan: body identical, doc comment reworded from family to section vocabulary.WidePlanAt: byte-identical.Invariant: byte-identical.PlanMisfits: body identical apart fromFamilyPlan->KeyedPlan, doc comment unchanged._WidePlanIsEveryFamilyPlanin the two family files, since there the plan is a family's.sectionslayer, and plan.ts draws no new import from shared.src/sections/contract/plan.ts,src/sections/shared/{keyed-values,repo-secrets,repo-variables,setup-section}.ts.