* feat(#3274): make reviewer-lane timeout configurable via timeoutConfigKey Add an optional `timeoutConfigKey` field to the reviewer lane descriptor, resolved in `resolveLanePlan` at invocation time and falling back to the frozen `timeoutFloorMs` when unset or invalid, in the same spirit as the existing `promptBudgetKey`/`modelConfigKey` fields. All 12 shipped lanes declare `review.timeouts.<slug>` on both surfaces (the descriptor and their capability.json manifest), validated by capability-validator.cjs. For the antigravity lane, the native `agy --print-timeout` flag — previously a second hardcoded literal (`540s`) independent of the outer cap — is now derived from the same resolved outer timeout in `antigravityArgv`, preserving the existing 60-second buffer relationship (ADR-2782 D6: the outer bound is declared data, the inner one is handler-owned). The antigravity default timeoutFloorMs stays at 600s per the maintainer's disposition; users raise it through the new config key instead. * docs(#3274): document review.timeouts.* and extract resolveTimeoutMs helper Address code-review findings on the timeoutConfigKey change: extract the inline timeout-resolution logic into a named, exported, directly-tested resolveTimeoutMs helper (matching the file's existing configString/ normalizeHost convention); document the new review.timeouts.* federated config keys in docs/CONFIGURATION.md, docs/reference/capability-manifest.md, and docs/how-to/ship-a-reviewer-lane.md; add the changeset fragment. * fix(#3274): resolve native antigravity timeout in resolveLanePlan, not the runner gsd-test caught two design mistakes in the prior commits: 1. SpawnPlan.argv is documented and tested as fully resolved by resolveLanePlan (model/effort/output/prompt already folded in) — leaving the antigravity '{{nativeTimeout}}' marker unresolved until the runner's antigravityArgv violated that contract and broke tests that read plan.argv directly (tests/antigravity-reviewer.test.cjs, tests/review-default-reviewers-workflow.test.cjs). Fix: '{{nativeTimeout}}' is now a fifth ARGV_PLACEHOLDER member, resolved by resolveLanePlan itself via the new nativeTimeoutToken() helper, exactly like the other four. antigravityArgv reverts to its pre-#3274 four-argument form. Also missed updating capabilities/antigravity/capability.json's invoke.args to match the descriptor, which broke the manifest/descriptor parity test. 2. tests/reviewer-config-federation.test.cjs enforces a deliberate, narrow invariant (#3691 narrows #2797): qwen, cursor, and coderabbit — the three lanes with neither a model flag nor a host — may own no config key beyond their own prompt-budget key. Adding review.timeouts.<slug> to all 12 lanes violated it. Fix: those three keep timeoutConfigKey: null and own no review.timeouts.* key, matching their existing modelConfigKey: null. The other 9 lanes are unaffected. * chore(#3274): backfill changeset PR number (pr:0 -> 4083) --------- Co-authored-by: sim <sim@local>
This commit is contained in:
@@ -1824,6 +1824,9 @@ const KNOWN_REVIEWER_FIELDS = new Set([
|
||||
// missed a configured model and silently disabled the pinned-model escape hatch
|
||||
// #2073 added. A convention one shipped lane already violates is not a contract.
|
||||
'modelConfigKey',
|
||||
// `timeoutConfigKey` added by #3274, same optional/backward-compatible shape as
|
||||
// `modelConfigKey` above: a manifest authored before this field existed must keep validating.
|
||||
'timeoutConfigKey',
|
||||
'handler',
|
||||
]);
|
||||
|
||||
@@ -2371,6 +2374,17 @@ function validateReviewerBodyFields(cap) {
|
||||
);
|
||||
}
|
||||
|
||||
// OPTIONAL, mirroring modelConfigKey's D4 forward/backward-compat treatment (#3274): a manifest
|
||||
// authored before this field existed must keep validating. Absent/null means "no override for
|
||||
// this lane, use timeoutFloorMs". An empty string is neither absent nor a key, and is rejected.
|
||||
if (r.timeoutConfigKey !== undefined && r.timeoutConfigKey !== null &&
|
||||
(typeof r.timeoutConfigKey !== 'string' || r.timeoutConfigKey.length === 0)) {
|
||||
errors.push(
|
||||
ctx + ' reviewer.timeoutConfigKey must be a dotted config key or null ' +
|
||||
'(got: ' + describeValue(r.timeoutConfigKey) + ')',
|
||||
);
|
||||
}
|
||||
|
||||
// `null` is the declared "no per-lane budget"; an empty string is not.
|
||||
if (r.promptBudgetKey !== null && (typeof r.promptBudgetKey !== 'string' || r.promptBudgetKey.length === 0)) {
|
||||
errors.push(
|
||||
|
||||
Reference in New Issue
Block a user