Skip to content

[Bugfix #562] Require --amends for --protocol tick#570

Merged
waleedkadous merged 1 commit intomainfrom
builder/bugfix-562-bug-builder-reads-wrong-spec-w
Feb 26, 2026
Merged

[Bugfix #562] Require --amends for --protocol tick#570
waleedkadous merged 1 commit intomainfrom
builder/bugfix-562-bug-builder-reads-wrong-spec-w

Conversation

@waleedkadous
Copy link
Contributor

Summary

Fixes #562

When af spawn 5 --protocol tick is run without --amends, the specLookupId falls back to the issue number instead of the spec being amended. This causes the builder to read the wrong spec file.

Root Cause

In spawn.ts, the spec lookup logic uses a conditional:

const specLookupId = (protocol === 'tick' && options.amends)
  ? String(options.amends)
  : projectId;

When --amends is omitted, specLookupId defaults to projectId (the issue number), which resolves a different spec than intended. There was no validation requiring --amends for TICK protocol.

Fix

Added validation in validateSpawnOptions() that --protocol tick requires --amends <spec-number>. This is the minimal Option A from the issue — fail fast with a clear error message rather than silently resolving the wrong spec.

Test Plan

  • Added regression test: --protocol tick without --amends returns error
  • All 106 existing spawn tests pass
  • Verified fix locally

@waleedkadous
Copy link
Contributor Author

Architect Review

Low-risk bugfix. Adds bidirectional validation: --amends already required --protocol tick, now --protocol tick also requires --amends. Clean error message, regression test included.


Architect review

@waleedkadous waleedkadous merged commit f9e0560 into main Feb 26, 2026
6 checks passed
@waleedkadous waleedkadous deleted the builder/bugfix-562-bug-builder-reads-wrong-spec-w branch February 26, 2026 15:46
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.

[Bug] Builder reads wrong spec when the protocol is tick (when --amends is omitted)

1 participant