Skip to content

chore(frontseat-api): GH-201 reserve removed fields, drop dead ExecutionMode - #229

Open
jbadeau wants to merge 3 commits into
mainfrom
chore/201-proto-hygiene
Open

chore(frontseat-api): GH-201 reserve removed fields, drop dead ExecutionMode#229
jbadeau wants to merge 3 commits into
mainfrom
chore/201-proto-hygiene

Conversation

@jbadeau

@jbadeau jbadeau commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Proto-hygiene checklist item of #201, stacked on #228 (both regenerate the same files; merge #228 first, then retarget this to main).

  • reserved for three removed fields whose tag reuse would corrupt journaled/replayed OperationEvents: ActionCompleted field 13 (sandbox_violations), plugin TaskConfig field 9, CheckReleaseGuardResponse field 9.
  • Remove + reserve the dead ExecutionMode enum and BuildRequest.execution_mode — builds are remote-only and there are zero non-generated references (verified by grep and a full go build of the workspace).

🤖 Generated with Claude Code

@jbadeau
jbadeau force-pushed the chore/201-proto-hygiene branch from 85ce016 to e1e8993 Compare July 28, 2026 12:52
@jbadeau
jbadeau force-pushed the chore/201-neutral-consumer-terms branch from 842ff91 to 38b929b Compare July 28, 2026 12:52
Jose Badeau and others added 2 commits July 28, 2026 14:55
References to specific downstream products in the OSS surface (proto
comments, API READMEs, the remote-only-execution design doc) become
product-neutral: "IDE integrations" and "aggregating consumers".

Regenerating also catches up pre-existing codegen drift: the committed
TypeScript gen still contained the removed relations/query/order_by
fields and predates protoc-gen-es 2.13.0, and bytestream.connect.go
lagged its source proto's header comment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ionMode

Reserve the tags of three removed fields so future reuse cannot corrupt
journaled/replayed OperationEvents: ActionCompleted 13
(sandbox_violations), plugin TaskConfig 9, CheckReleaseGuardResponse 9.

Remove the ExecutionMode enum and BuildRequest.execution_mode (reserved
too): builds are remote-only and nothing outside generated code
references them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jbadeau
jbadeau force-pushed the chore/201-neutral-consumer-terms branch from 38b929b to e344977 Compare July 28, 2026 12:55
@jbadeau
jbadeau force-pushed the chore/201-proto-hygiene branch from e1e8993 to 6579662 Compare July 28, 2026 12:55
Base automatically changed from chore/201-neutral-consumer-terms to main July 29, 2026 06:12

@joaodinissf joaodinissf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving — the four reservations are right, ExecutionMode is dead.

Two inline notes on the protos: TaskConfig and CheckReleaseGuardResponse need no reserved name (neither ever had a field 9), and BuildRequest.sandbox_mode = 9 is a fifth removed field still unreserved and untracked in #201.

Stale docs: docs/design/remote-only-execution.md still describes ExecutionMode as a live enum with LOCAL/REMOTE/AUTO meanings, and still points at ActionCompleted.sandbox_violations. This PR already edits that file, so both fold into the same pass.

ExecutionMode is an exported symbol of the in-repo TypeScript package @frontseat/api. That package is unpublished — version 0.0.0, absent from npm and GitHub Packages — and sibling repos consume it by path per docs/design/cross-repo-api-adoption.md, so the removal is wire-safe and source-breaking for those consumers next time they pick up the generated package.

This review was published with assistance from Claude.

google.protobuf.Struct options = 6;
LifecycleBinding lifecycle = 7;
repeated string workspace_inputs = 8;
reserved 9;

@joaodinissf joaodinissf Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number alone is the complete statement here — there is no identifier to reserve. TaskConfig has never had a field 9: every revision goes straight from repeated string workspace_inputs = 8; to CacheConfig cache = 10;, and CheckReleaseGuardResponse carries the same original 8→10 gap.

BuildRequest and ActionCompleted reserve both number and name (reserved 6; reserved "execution_mode";) because those fields really existed. These two never did.

Worth a short comment on both saying the tag was never assigned, so a future reader does not go hunting for a removed field that never existed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — number-only is already what's committed (reserved 9; with no name on both), since neither TaskConfig nor CheckReleaseGuardResponse ever had a field 9. The clarifying comment you asked for rides with the same frontseat generate pass as the sandbox_mode reservation (see the other thread): it's a .proto edit, so it moves the .frontseat-gen.lock fingerprint, which I can't reproduce reliably offline. Tracked, not dropped.


Generated by Claude Code

reserved 6;
reserved "execution_mode";
CacheMode cache_mode = 7;
int32 max_workers = 8;

@joaodinissf joaodinissf Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildRequest is missing one: sandbox_mode = 9 (TYPE_STRING) was removed without a reserved, and it is not on the #201 checklist — the one hole left open in the message this PR is otherwise closing.

Suggested change
int32 max_workers = 8;
int32 max_workers = 8;
reserved 9;
reserved "sandbox_mode";

No live hazard: sandbox_mode never shipped in a release, and BuildRequest is never journaled (only OperationEvent is), so tag 9 cannot mis-parse anything in the field. Worth reserving purely for consistency with the execution_mode = 6 reservation this PR already makes in the same message.

Note that reserved is encoded into the descriptor as reserved_range/reserved_name — visible in this PR own .pb.go hunk — so the generated Go and TS, and .frontseat-gen.lock, need regenerating in the same commit.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landed the stale-docs half of this in 2f6cb4c: remote-only-execution.md §5.1 no longer describes ExecutionMode as a live LOCAL/REMOTE/AUTO enum, §5.4 no longer points at ActionCompleted.sandbox_violations as a live field, and §10 lists ActionCompleted as 1..12 (field 13 reserved) — all consistent with the reservations this PR already makes.

The sandbox_mode = 9 reservation I did not push here, deliberately. Reserving it edits frontseat.proto, which regenerates .pb.go + the TS package and the .frontseat-gen.lock fingerprint — and that lock is computed by the frontseat sandbox (buf:generate-check) with staged paths I can't reproduce outside the daemon/grid (a pristine find | sha256sum reproduction doesn't match the committed lock, so hand-writing it would just redden the check on an approved PR). It wants a real frontseat generate run. I can do the proto edit + regen the moment I'm in an environment with the daemon, or hand it back to you to run frontseat generate — whichever you prefer. Flagging so the sandbox_mode hole stays tracked and isn't silently dropped.


Generated by Claude Code

… fields

The design doc still described machinery this PR's proto reservations removed:

- Section 5.1 described ExecutionMode as a live enum with LOCAL/REMOTE/AUTO
  meanings; builds are remote-only and BuildRequest.execution_mode + the
  ExecutionMode enum are removed (tags reserved). State that instead.
- Section 5.4 pointed at ActionCompleted.sandbox_violations as the live "why
  it failed" signal; that field is removed and its tag reserved, so describe
  the surviving mechanism (violations surfaced through the action's failure
  output).
- Section 10 listed ActionCompleted "fields 1..13"; field 13
  (sandbox_violations) is reserved, so it is 1..12.

Docs only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYAgCD9HZHZWEuH4vF17p1
@joaodinissf

Copy link
Copy Markdown
Collaborator

We'll run it — you're blocked on a fingerprint only the daemon can produce, and we have one. It'll be a follow-up once this lands rather than a push onto your branch, carrying reserved 9; reserved "sandbox_mode"; on BuildRequest plus the regenerated artefacts in a single commit.

Confirmed the number-only reservations are right, incidentally: plugin.proto does reserve names elsewhere (reserved "options" at 277, 291, 420), but tag 9 in TaskConfig and CheckReleaseGuardResponse never carried one, so there's nothing to reserve. And the descriptors are in sync — plugin.pb.go picked up J\x04\b\t\x10\n in both messages, which is reserved_range [9,10).

One thing blocking it: the branch conflicts because e344977 duplicates 2d69832, already on main. They share patch-id 9661c730222250a3, so a rebase onto main drops it cleanly with nothing to resolve.

This comment was published with assistance from Claude.

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.

3 participants