feat(gatorwalk-factory): a factory reads its definition from a file in the repo (swamp-club #2803) #386
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/2803-gatorwalk-factory-lifecycle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
swamp-club #2803: a factory reads its definition from a file in the repo.
What changes
globalArgumentsare now{ definition: <repo-relative path> }(factories/<name>.yamlby convention) instead of the definition pasted inline. There is one copy of each definition, in the repo._lib/engine/definition_file.tsresolves the path againstrepoDirand refuses, naming the path: absolute, not.yaml/.yml, outside the repo (lexically or through symlinks), missing, or not a file. Away from a swamp repo (a remote worker) it says to start the work item where the repo is. Reads and creates go through the resolved path.validate,design_page,new_key,start,reset repin=trueand the tracker'sclaimread the file throughloadFactoryDefinition, whose name and signature are unchanged. Pinning is unchanged: editing the file never changes a running work item.init --input from=<example>copies any of the skill's examples to the path and never overwrites. The examples are embedded bydeno task gen:starters, because swamp bundles models and there is no manifest until go-live;scripts/gen_starters_test.tsguards against drift.definition_file.tsuses pinnedjsr:imports: swamp bundles reports without the import map, and the work-item-summary report imports the engine.factory()helper. The integration harness creates factories with--global-arg. New integration cases cover the acceptance criteria, and the skill's worked example runsinitas written.driving.md, the worked example), README, and DESIGN.md ("Where a factory definition lives", decision log).${{stays rejected until go-live settles it.Deviations from the issue
definitionand the directoryfactories/, following #2785's rename, notlifecycle/lifecycles/.import.meta.urlpoints into.swamp/bundles.Verification
verify-build
7e5da72c(12 passed, 2 skipped by guard, 0 failed) and verify-reviewsad14c844(code review and adversarial review both pass); attestation86abaf81forf34785b79. Low findings left open: another process could plant a symlink betweeninit's containment check and its write (it would need a hostile local process running at the same time), and one test assertion matches only a prefix of the starter list.🤖 Generated with Claude Code
A factory's globalArguments are now { definition: <repo-relative path> }, factories/<name>.yaml by convention, instead of the definition pasted inline. One copy of each definition lives in the repo; nothing drifts. - _lib/engine/definition_file.ts resolves the path against repoDir and refuses, naming the path, an absolute path, a non-.yaml/.yml path, one outside the repo (lexically or through symlinks) and a missing file; away from a swamp repo (a remote worker) it says to start the work item where the repo is. - validate, design_page, new_key, start, reset repin=true and the tracker's claim read the file through loadFactoryDefinition; pinning is unchanged. - New init method copies a starter (any of the skill's examples) to the path and never overwrites. The starters are embedded by deno task gen:starters, since swamp bundles models and there is no manifest until go-live; a test guards against drift. - The fake gains an in-memory repo with symlinks; the integration harness creates factories with --global-arg; the skill, README and DESIGN.md ("Where a factory definition lives", decision log) are updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>