Skip to content

mcpx: run ops.gen.ts codegen as part of treefmt (auto-format), like just-recipes.json #4814

Closed

Description

@dezren39

Follow-up to #4807 (merged), which made the mcpx nix build regenerate plugin/opencode/mcpx/ops.gen.ts in preCheck so a build can never go red on a stale checked-in copy. That protects the BUILD. The TREE can still carry a stale copy for anyone consuming the plugin as raw source between regenerations (Drew's stale-type-hint principle, and Drew's suggestion 2026-11-03: "make code Gen part of the auto format").\n\nPrecedent in this repo: just fix already regenerates just-recipes.json as part of the format path — generated files refreshing alongside formatting is an established pattern here.\n\nProposal: register the ops regeneration as a treefmt formatter in treefmt.toml:\n- command: a small wrapper that runs go test ./internal/api -run TestPluginOpsAreGenerated -update (the generator's home package, from the repo root, mirroring package.nix's preCheck exports if needed).\n- include: the files whose change can alter the /v1 table the generator renders from (internal/api/**/*.go — refine to the table's actual inputs).\n- effect: just fmt refreshes ops.gen.ts with everything else, and lefthook's treefmt --fail-on-change pre-commit check rejects a stale copy exactly the way it rejects unformatted code — no new mental model, no new habit.\n\nThe two mechanisms compose: treefmt keeps the tree fresh for raw-source consumers; the nix preCheck guarantees the build regardless of how the tree was produced. Go availability in the format environment is the same requirement class as the existing gofmt formatter.

Activity

  1. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — already done, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions