Skip to content

feat(op): LexiconUpgradeOp + scheduled runner + PR automation - #532

Merged
lex00 merged 1 commit into
mainfrom
feat/527-lexicon-upgrade-op
Jul 2, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/527-lexicon-upgrade-op

Conversation

@lex00

@lex00 lex00 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes #527. Final sub-issue of epic #523 — the runner that dogfoods chant to keep in-scope lexicons current with upstream specs.

What

  • LexiconUpgradeOp composite (temporal lexicon), modeled on WorkflowAuditOp. Phases detect a newer upstream spec, dispatch to the right check, run the surface-diff, and surface a finding. Rejects out-of-scope lexicons (helm/temporal/forgejo) at construction.
  • lexiconUpgrade activity: pinned-vs-rolling classification/dispatch, finding-mode selection, semver labeling, and idempotent PR automation.
  • Scheduled workflow .github/workflows/lexicon-upgrade.yml — the first schedule: in the repo. Weekly cron, matrix over the 7 in-scope lexicons, pull-request mode, per-lexicon jobs mirroring publish.yml. Never auto-merges.
  • ops/lexicon-upgrade/<lexicon>-upgrade.op.ts — the Op definitions chant run discovers; mode read from CHANT_UPGRADE_MODE.

Design

  • Dispatch: PINNED {k8s, gcp, docker, gitlab} → checkPinnedUpgrade (feat(codegen): pinned-version spec bump pipeline (k8s, gcp, docker, gitlab) #525); ROLLING {aws, azure, github} → checkRollingUpgrade (feat(codegen): rolling-spec drift pipeline (aws, azure, github) #526). Detection/regen/diff are consumed, not reimplemented.
  • Finding modes: report (default, no external services) | issue | pull-request. Runs one-shot on the local executor; optional TemporalSchedule for continuous re-check.
  • PR idempotency: long-lived branch per lexicon (lexicon-upgrade/<lexicon>), reset from main each run. If the open PR body already matches the new summary (trim-insensitive), the run short-circuits with no git/PR mutation. Otherwise the branch is force-pushed and the PR body updated in place — a re-PR happens only when the delta changes.
  • Semver labeling: surface severity additive → minor, breaking → breaking.
  • Breakage is never silent: a failing regen/validation in pull-request mode falls back to an issue carrying the diff — never a PR, never an auto-rewrite. An upstream fetch error surfaces as a non-upgrade report.

Supply chain

Regen runs through each lexicon's own generate step; the Op only reads produced artifacts and never executes spec-provided input.

Validation

  • npx tsc --noEmit -p packages/core/tsconfig.json — clean.
  • The two new lexicon source files typecheck clean against core via the root tsconfig paths.
  • npx vitest run on the new + existing temporal tests — 77 passing (27 new); pinned-upgrade + activity-registry core tests green.
  • No live regenLexicon/npm run generate in the dev loop — the check functions and gh are mocked in tests; the workflow runs live in CI.

Add the runner that dogfoods chant to keep in-scope lexicons current with
their upstream specs (closes #527, epic #523).

- LexiconUpgradeOp composite (temporal lexicon), modeled on WorkflowAuditOp:
  detects a newer upstream spec, dispatches PINNED {k8s,gcp,docker,gitlab} to
  checkPinnedUpgrade and ROLLING {aws,azure,github} to checkRollingUpgrade,
  runs the surface-diff, and surfaces a finding. helm/temporal/forgejo are
  rejected at construction (no upstream spec). Finding modes report (default,
  no external services) | issue | pull-request. Runs one-shot on the local
  executor via chant run; optional TemporalSchedule for continuous re-check.
- lexiconUpgrade activity: pinned-vs-rolling classification/dispatch,
  finding-mode selection, semver labeling (additive to minor, changed/removed
  to breaking), and idempotent PR automation on a long-lived branch per
  lexicon (lexicon-upgrade/<lexicon>) that updates the open PR in place and
  re-pushes only when the delta changes. A failing regen/validation surfaces
  a report or issue with the diff, never a PR and never an auto-rewrite.
- Scheduled workflow .github/workflows/lexicon-upgrade.yml (first schedule in
  the repo): weekly cron, matrix over the 7 in-scope lexicons, pull-request
  mode, per-lexicon jobs mirroring publish.yml. Never auto-merges.
- ops/lexicon-upgrade/<lexicon>-upgrade.op.ts: the Op definitions chant run
  discovers; mode is read from CHANT_UPGRADE_MODE so one definition serves the
  local report loop and the CI pull-request loop.
- Consume-only integration hook in codegen/pinned-upgrade.ts: export
  applyPinnedVersionBump (wraps the internal pin-location map + existing
  applyVersionBump) so the Op can commit a bump to a branch; export
  checkPinnedUpgrade and its types from the core barrel. No detection, regen,
  or diff logic is reimplemented or changed.
@lex00
lex00 merged commit 98eb6be into main Jul 2, 2026
9 of 10 checks passed
@lex00
lex00 deleted the feat/527-lexicon-upgrade-op branch August 3, 2026 19:21
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.

feat(op): LexiconUpgradeOp + scheduled runner + PR automation

1 participant