feat(routing): add cheapest-capable local worker routing - #135
feat(routing): add cheapest-capable local worker routing#135Nobodyworld wants to merge 4 commits into
Conversation
Issue #134 final-head validation
The PR remains draft, open, and unmerged. |
Nobodyworld
left a comment
There was a problem hiding this comment.
Connector review found one release-blocking restart-compatibility gap.
CommandManifest now maps a new non-null updated_at column, but the additive startup compatibility routine does not add or backfill updated_at on an existing execution_command_manifests table. The base main schema has only created_at; Base.metadata.create_all() does not alter existing tables; and startup immediately calls ensure_manifests(), which selects the full ORM model. A repository database created by current main can therefore fail with a missing-column error during upgrade.
Correct this narrowly by either removing the unused manifest updated_at field or adding an idempotent additive migration/backfill. Add a regression that creates the prior manifest table shape, seeds or resolves a trusted manifest, runs lifespan startup twice, and proves manifest reads still work. Re-run the focused startup/routing suites and complete protected matrix. Keep PR #135 draft and unmerged until re-review.
No redesign of routing, scoring, quota, APIs, or worker behavior is requested.
Summary
Implements issue #134: deterministic cheapest-capable routing among trusted actively polling local workers, with server-owned integer cost/quota profiles and atomic quota lifecycle.
Delivered behavior
first_availableremains the omitted-policy compatibility default.cheapest_capableselects the deterministic best fully eligible actively polling local worker.Implementation scope
30 files changed across the living ExecPlan, execution persistence/service/API, routing/scoring, settings, worker response parsing, concurrency and lifecycle tests, and operator documentation.
Connector-observed diff:
Implementation commits:
2e9b38c02099c1435517daba69d582342eb479ee—feat(routing): add cheapest capable local checkout95515bbc96bd872f727146988a7e90697a182d40—test(routing): prove atomic quota lifecycle49b96ea361c9532d60eaf031582a8f55c52f228a—docs(routing): document local cost-aware routingCurrent validation
Local evidence reported for the exact head:
git diff --checkpassed;Hosted exact head:
30718472333— success;30718472369— success;Connector review
Connector review
4835888072found one restart-compatibility blocker:CommandManifestnow maps a non-nullupdated_atcolumn, but the additive startup compatibility routine does not add/backfill that column on the existingexecution_command_manifeststable from currentmain.create_all()will not alter the table, and startup immediately selects the full manifest ORM model. Existing databases may therefore fail during upgrade.Required narrow correction:
updated_atfield or migrate/backfill it idempotently;No routing, quota, scoring, API, worker, or product redesign is requested.
Keep PR #135 draft and unmerged until the correction and connector re-review pass.
Closes #134 only after explicit owner-authorized merge.