Problem
FrameworkBuildOptions.force is declared and documented as controlling overwrite behaviour:
/** When true, overwrite existing files at canonical flat paths. Only meaningful in flat mode. */
readonly force?: boolean;
Nothing reads it. FrameworkBuildUseCase.execute() destructures only sourceDir and outDir. The field has writers and zero readers.
What actually drives FlatBuildStrategy.checkCollision is a constructor parameter (flat-build-strategy.ts:32, used at lines 273 and 320), threaded through createFrameworkBuildUseCase in deps.ts.
So aidd framework build --flat --force does work, but not through the options object. Anyone debugging a force-related problem would find force being passed to execute() and reasonably conclude it was wired.
Same shape as #464: a documented surface that does not do what it says.
Second problem: the real wiring is untested
Nothing verifies that the user's --force reaches FlatBuildStrategy at all. Making deps.ts ignore the caller's flag breaks no test.
A test that constructs FlatBuildStrategy directly with a literal true does not close this, because it would still pass if deps.ts stopped threading the flag.
Not a data-loss risk
For the record, since it looked like one: runBuild in ensure-built-marketplace-use-case.ts passes force: true unconditionally, which suggested user files could be overwritten. It cannot. That call has exactly two callers, one passing the .aidd/cache/built/<marketplace>/<target> cache dir and one passing a tmpdir() path deleted immediately before the build. Neither is user-authored content, so forcing an overwrite there is cache invalidation — and the flag was inert anyway.
Expected
- the dead option removed, so the type surface stops claiming a capability it does not have;
- a test at the factory level pinning both sides of the real flag:
FlatTargetExistsError without --force, overwrite with it;
- a test pinning that
runBuild's outDir stays inside the aidd cache or tmp, so pointing it at a user directory fails loudly.
Problem
FrameworkBuildOptions.forceis declared and documented as controlling overwrite behaviour:Nothing reads it.
FrameworkBuildUseCase.execute()destructures onlysourceDirandoutDir. The field has writers and zero readers.What actually drives
FlatBuildStrategy.checkCollisionis a constructor parameter (flat-build-strategy.ts:32, used at lines 273 and 320), threaded throughcreateFrameworkBuildUseCaseindeps.ts.So
aidd framework build --flat --forcedoes work, but not through the options object. Anyone debugging a force-related problem would findforcebeing passed toexecute()and reasonably conclude it was wired.Same shape as #464: a documented surface that does not do what it says.
Second problem: the real wiring is untested
Nothing verifies that the user's
--forcereachesFlatBuildStrategyat all. Makingdeps.tsignore the caller's flag breaks no test.A test that constructs
FlatBuildStrategydirectly with a literaltruedoes not close this, because it would still pass ifdeps.tsstopped threading the flag.Not a data-loss risk
For the record, since it looked like one:
runBuildinensure-built-marketplace-use-case.tspassesforce: trueunconditionally, which suggested user files could be overwritten. It cannot. That call has exactly two callers, one passing the.aidd/cache/built/<marketplace>/<target>cache dir and one passing atmpdir()path deleted immediately before the build. Neither is user-authored content, so forcing an overwrite there is cache invalidation — and the flag was inert anyway.Expected
FlatTargetExistsErrorwithout--force, overwrite with it;runBuild'soutDirstays inside the aidd cache or tmp, so pointing it at a user directory fails loudly.