refactor(gatorwalk-factory): rename lifecycle to factory and drop holder (swamp-club #2785) #385

Merged
seth merged 2 commits from cue/2785-gatorwalk-factory-decide into main 2026-09-30 17:37:46 +00:00
Owner

Closes swamp-club #2785. Seth decided to rename gatorwalk-factory's "lifecycle" to "factory" before go-live (2026-10-14), to do it in this issue, and to drop "holder" now and for the future.

Vocabulary

  • factory: the named model, type @swamp/gatorwalk-factory/factory (e.g. team). You run validate, design_page and new_key on it and start work items on it.
  • factory definition: the YAML document a factory keeps as its globalArguments. In code and data it is definition.
  • work item: unchanged.

README.md gains a short Vocabulary section with these terms.

Two commits

  1. The codemod, gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts, with 9 tests. scripts/ is added to the gatorwalk-factory targets in verification/checks.yaml and deno.json.
  2. Its output (then deno fmt), 69 files. A clean break with no data migration:
    • the model type @swamp/gatorwalk-factory/lifecycle becomes .../factory
    • start (work item) and claim (trackers) take factory=<factory>
    • the work item's pinned resource is definition, with fields {factory, digest, definition}
    • the run-record and journal field is definition
    • the claim record's holder becomes factory
    • renamed files: engine/factory.ts, engine/factory_test.ts, engine/factories_test.ts, _lib/engine/definition_schema.ts and its test, testdata/factories/

These keep the word: @swamp/issue-lifecycle, swamp-club lifecycle entries, the /api/v1/lab/issues/<n>/lifecycle route, and lifecycle_entry. --check fails if any of them goes missing, because the fakes are renamed along with the code and the tests alone would not catch it.

For work in flight

Rebase onto this, then run:

deno run --allow-read --allow-write --allow-run=git gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts
deno run --allow-read --allow-run=git gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts --check

A second run makes no changes. This PR has already been re-run twice this way: it was rebased over #2804, #2696 and #2793, which moved _lib/ into engine/ and tracker/.

Notes

  • No model versions are bumped. The extension is unpublished and has no upgrade chain, as with earlier gatorwalk-factory changes.
  • The definition's own name field duplicates the factory's model name. That is split out to swamp-club #2816.
  • Verified: verify-build 13/14 passed (1 skipped by guard). code-review, adversarial-review and ci-security-review all pass. The attestation is posted for 4e7e381.

🤖 Generated with Claude Code

Closes swamp-club #2785. Seth decided to rename gatorwalk-factory's "lifecycle" to "factory" before go-live (2026-10-14), to do it in this issue, and to drop "holder" now and for the future. ## Vocabulary - **factory**: the named model, type `@swamp/gatorwalk-factory/factory` (e.g. `team`). You run `validate`, `design_page` and `new_key` on it and start work items on it. - **factory definition**: the YAML document a factory keeps as its `globalArguments`. In code and data it is `definition`. - **work item**: unchanged. README.md gains a short Vocabulary section with these terms. ## Two commits 1. **The codemod**, `gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts`, with 9 tests. `scripts/` is added to the gatorwalk-factory targets in `verification/checks.yaml` and `deno.json`. 2. **Its output** (then `deno fmt`), 69 files. A clean break with no data migration: - the model type `@swamp/gatorwalk-factory/lifecycle` becomes `.../factory` - `start` (work item) and `claim` (trackers) take `factory=<factory>` - the work item's pinned resource is `definition`, with fields `{factory, digest, definition}` - the run-record and journal field is `definition` - the claim record's `holder` becomes `factory` - renamed files: `engine/factory.ts`, `engine/factory_test.ts`, `engine/factories_test.ts`, `_lib/engine/definition_schema.ts` and its test, `testdata/factories/` These keep the word: `@swamp/issue-lifecycle`, swamp-club lifecycle entries, the `/api/v1/lab/issues/<n>/lifecycle` route, and `lifecycle_entry`. `--check` fails if any of them goes missing, because the fakes are renamed along with the code and the tests alone would not catch it. ## For work in flight Rebase onto this, then run: ``` deno run --allow-read --allow-write --allow-run=git gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts deno run --allow-read --allow-run=git gatorwalk-factory/scripts/rename_lifecycle_to_factory.ts --check ``` A second run makes no changes. This PR has already been re-run twice this way: it was rebased over #2804, #2696 and #2793, which moved `_lib/` into `engine/` and `tracker/`. ## Notes - No model versions are bumped. The extension is unpublished and has no upgrade chain, as with earlier gatorwalk-factory changes. - The definition's own `name` field duplicates the factory's model name. That is split out to swamp-club #2816. - Verified: verify-build 13/14 passed (1 skipped by guard). code-review, adversarial-review and ci-security-review all pass. The attestation is posted for 4e7e381. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A re-runnable codemod for the vocabulary chosen before go-live: a
factory is the named model (@swamp/gatorwalk-factory/factory), its factory
definition is the YAML document in its globalArguments (definition in
code), and holder is gone. Work in flight rebases and runs it over its
branch; a second run changes nothing.

@swamp/issue-lifecycle, swamp-club's lifecycle entries and the lifecycle
API route keep the word. --check fails if any other lifecycle or holder is
left, or if one of those swamp-club strings goes missing: the fakes are
renamed with the code, so the tests alone would not catch it.

scripts/ is added to the gatorwalk-factory check, lint, fmt and test
targets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
refactor(gatorwalk-factory): rename lifecycle to factory and drop holder (swamp-club #2785)
All checks were successful
CI / Validate Attestation (pull_request) Successful in 59s
CI / Review Integrity (pull_request) Successful in 1m13s
4e7e381b6f
The output of scripts/rename_lifecycle_to_factory.ts, then deno fmt. A
clean break before go-live, with no data migration:

- model type @swamp/gatorwalk-factory/lifecycle -> .../factory
- work_item start and tracker claim take factory=<factory>
- the work item's pinned resource lifecycle -> definition, with fields
  {factory, digest, definition}; the run record and journal field
  lifecycle -> definition
- lifecycle.ts, lifecycle_schema.ts, lifecycles_test.ts and
  testdata/lifecycles/ -> factory.ts, definition_schema.ts,
  factories_test.ts and testdata/factories/
- README gains a short vocabulary section; README, DESIGN, the skill and
  the examples use the new words throughout

Model versions are not bumped: the extension is unpublished and has no
upgrade chain, as with every earlier gatorwalk-factory change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
seth merged commit 3c56aff44d into main 2026-09-30 17:37:46 +00:00
seth deleted branch cue/2785-gatorwalk-factory-decide 2026-09-30 17:37:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
swamp-club/swamp-extensions!385
No description provided.