Follow-up from #268 (PR #275). Found by the T7 worker during implementation and confirmed.
The problem
#271 added tier_policy to the backend HiveExecutionPolicy (src-tauri/src/domain/execution.rs), and #275 emits it from buildHiveLaunchConfig() in src/lib/components/hiveLaunch.ts.
But the shared TypeScript type HiveLaunchConfig in src/lib/types/domain.ts never gained the field. Confirmed: grep tier_policy src/lib/types/domain.ts returns nothing.
Why it was left alone
src/lib/types/domain.ts was outside T7's owned paths under the epic's one-owner-per-file rule, so rather than widen scope the worker used a local intersection return type in hiveLaunch.ts to represent the now-emitted backend contract. That was the right call at the time — but it means the shared type is now knowingly incomplete, and the workaround is invisible to anyone reading domain.ts.
Why it matters
The shared type is what other call sites reason about. Any future code that builds a launch config from HiveLaunchConfig will not know tier_policy exists, and TypeScript will not help them. The local intersection only protects the one function that declares it.
Suggested fix
Add tier_policy to HiveLaunchConfig in src/lib/types/domain.ts, mirroring the backend shape (enabled, ceiling_percent, review_floor, ladder), then drop the local intersection in hiveLaunch.ts.
Worth checking at the same time whether any other execution-policy field has drifted between domain.ts and domain/execution.rs — this one went unnoticed through a whole epic, so it is unlikely to be the only one.
Acceptance
HiveLaunchConfig carries tier_policy.
hiveLaunch.ts returns the plain shared type with no intersection.
npm run check clean; hiveLaunch.test.ts's full-shape toEqual assertion still passes.
Follow-up from #268 (PR #275). Found by the T7 worker during implementation and confirmed.
The problem
#271 added
tier_policyto the backendHiveExecutionPolicy(src-tauri/src/domain/execution.rs), and #275 emits it frombuildHiveLaunchConfig()insrc/lib/components/hiveLaunch.ts.But the shared TypeScript type
HiveLaunchConfiginsrc/lib/types/domain.tsnever gained the field. Confirmed:grep tier_policy src/lib/types/domain.tsreturns nothing.Why it was left alone
src/lib/types/domain.tswas outside T7's owned paths under the epic's one-owner-per-file rule, so rather than widen scope the worker used a local intersection return type inhiveLaunch.tsto represent the now-emitted backend contract. That was the right call at the time — but it means the shared type is now knowingly incomplete, and the workaround is invisible to anyone readingdomain.ts.Why it matters
The shared type is what other call sites reason about. Any future code that builds a launch config from
HiveLaunchConfigwill not knowtier_policyexists, and TypeScript will not help them. The local intersection only protects the one function that declares it.Suggested fix
Add
tier_policytoHiveLaunchConfiginsrc/lib/types/domain.ts, mirroring the backend shape (enabled,ceiling_percent,review_floor,ladder), then drop the local intersection inhiveLaunch.ts.Worth checking at the same time whether any other execution-policy field has drifted between
domain.tsanddomain/execution.rs— this one went unnoticed through a whole epic, so it is unlikely to be the only one.Acceptance
HiveLaunchConfigcarriestier_policy.hiveLaunch.tsreturns the plain shared type with no intersection.npm run checkclean;hiveLaunch.test.ts's full-shapetoEqualassertion still passes.