Skip to content

feat(runtime): warn when a topology timeout pin is below the default it overrides (#675) - #1256

Merged
aviggiano merged 3 commits into
unstablefrom
fix/675-timeout-shadow-warning
Oct 2, 2026
Merged

aviggiano merged 3 commits into
unstablefrom
fix/675-timeout-shadow-warning

Conversation

@mrthankyou

@mrthankyou mrthankyou commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #675.

What's left in #675

The 7200 pin revert and the CI guard on the packaged topologies (#689) landed. What's still open, per the issue's last comment, is the plan-time warning. A node or group timeout_seconds pin outranks the model profile timeout_seconds and run.default_timeout_seconds, even when the pin is the shorter window, and nothing reported it. A project's own topology got no check at all.

Confirmed on unstable (5c1a9775): with default_timeout_seconds = 14400, validate passed the default topology's 7200 pins silently. No source in packages/{topology,config,runtime}/src checks this.

Change

  • packages/runtime/src/timeout-shadowing.ts: timeoutShadowingDiagnostics checks each pinned agentic node in the expanded graph. A pinned node is one with a node or group pin. It compares the pin against the default task compilation would apply without it: the node's model profile timeout_seconds, otherwise run.default_timeout_seconds. The profile timeout is read from the config, because expansion folds the run default into each fan-out entry. Each pin below that default produces one TOPOLOGY_TIMEOUT_SHADOWS_DEFAULT warning. The warning names the pin and its path (groups.<id>.defaults.timeout_seconds or nodes.<id>.timeout_seconds), the largest default it overrides, and the nodes it applies to, listing the first three.
  • validate adds the warnings to the topology posture, which then reads warn. plan adds them to its diagnostics, and run passes them through.
  • The warning changes nothing about resolution. A pin can be a deliberately shorter budget.
  • Docs: docs/reference/configuration.md and a CHANGELOG entry.

Not in scope: the model-aware timeout and the finalisation reserve from the original proposal. The issue's comments treat those separately (#680, the runtime's absolute deadline).

Tests

  • validate on the shipped default topology gives no warning. With default_timeout_seconds = 14400 it warns for the goals, strategies, specialists and review group pins, and the topology posture is warn.
  • plan warns for a group pin (600) and a node pin (300) below the 3600 default, and not for a node pin (7200) above it.
  • Ran the two new tests plus the existing validate/plan tests: all pass. Strict eslint and prettier are clean on the changed files. I have not run the full runtime suite locally.

🤖 Generated with Claude Code

RetriggerConfidence Score: 4/5

The PR should not merge until the duplicate-run precheck handles Smithers stores outside the project-root database path.

Summary

The PR adds warnings when topology timeout pins override longer defaults and adds a pre-planning check for run IDs already recorded by the workflow engine.

  • Validation and planning report timeout-shadowing diagnostics without changing timeout resolution.
  • The new run-ID check misses engine records for projects whose Smithers store is not at the project-root database path.

Reviews (3) · Last reviewed commit: "Merge branch 'unstable' into fix/675-tim..."

…it overrides (#675)

A node's timeout resolves to its own pin, then its group's pin, then its
model profile's timeout_seconds, then run.default_timeout_seconds, so a
pin wins even when it is the shorter window. Raising a default silently
did not reach pinned nodes. validate, plan and run now report a
TOPOLOGY_TIMEOUT_SHADOWS_DEFAULT warning for each such pin, naming the
default it overrides and the nodes it applies to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrthankyou
mrthankyou requested a review from a team as a code owner October 1, 2026 16:01
Comment thread packages/runtime/test/runtime.test.ts
thankyou and others added 2 commits October 1, 2026 12:03
… overrides (#675)

The profile's own timeout_seconds is the default a pin overrides when it
has one, and task compilation prefers it to run.default_timeout_seconds,
so the warning must name the profile's value even when the run default
is longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG.md conflict by keeping both entries.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aviggiano
aviggiano merged commit dae9653 into unstable Oct 2, 2026
4 of 5 checks passed
@aviggiano
aviggiano deleted the fix/675-timeout-shadow-warning branch October 2, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants