Skip to content

feat: ovens plugin framework + per-repo identity + review fixes#4

Merged
apresmoi merged 30 commits into
mainfrom
feat/ovens-framework
Jul 14, 2026
Merged

feat: ovens plugin framework + per-repo identity + review fixes#4
apresmoi merged 30 commits into
mainfrom
feat/ovens-framework

Conversation

@apresmoi

@apresmoi apresmoi commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Turns ovens from a hardcoded special-case into a real framework, fixes the review
findings from #2/#3/#4, and adds CI + a publish workflow.

Ovens framework

  • Handler registry: the server no longer imports the differential-testing
    engine or branches on id === "differential-testing". Each oven registers a
    handler (data, dashboard rows, background warm); unknown ids stay validated:false.
  • Per-repo identity: custom ovens are identified by (repoKey, ovenId);
    built-ins are global. Discovery, /api/ovens, /api/ovens/:id?repoKey, oven-data,
    and run creation all resolve per repo — two repos with the same custom oven id
    never collide, and a run snapshots the correct repo's definition. oven bind,
    oven fork (writes oven.json lineage), per-repo binding stores.
  • Atomic oven packages: custom ovens publish via a cross-platform pointer file
    (<id>/current -> rev-*), swapped by atomic file-rename. Reads are lock-free
    (resolve current once); GC is retirement-grace so a reader never hits ENOENT.
  • Safety: oven writes require the target path be git-ignored (refused otherwise;
    burnlist init ignores .local/); paths are containedJoin-guarded against
    symlink escapes; malformed packages/bindings are isolated, never destroyed.
  • Computed ovenRevision; run manifest schemaVersion 3 -> 4 (verified against snapshot).

Review fixes (#2 landing, #3 lifecycle, #4 ovens)

  • Landing filter re-opens the matching project; duplicate-id rows route by plan path.
  • Lifecycle moves are crash-safe (content-at-create lock, rename-then-digest with
    rollback, resumable/validated close).
  • Per-row dashboard isolation: one bad oven/binding/plan never blanks the landing
    (it becomes a Blocked row). CLI oven list and /api/ovens isolate malformed packages.

CI/CD

  • ci.yml: build + verify + package check on PRs and pushes to main, Node 18/20/22.
  • publish.yml: manual dispatch (patch/minor/major); refuses non-main; commit-bound
    recovery
    — publishes/tags the exact npm artifact commit (gitHead), resumes from
    current origin/main, and fails on operational errors rather than mis-tagging.

The dashboard stays a read-only observer; only the CLI (and token-gated .local/
POSTs) mutate canonical state.

Note: publishing needs an NPM_TOKEN repo secret; the version bump happens in the
publish workflow.

@apresmoi

Copy link
Copy Markdown
Collaborator Author

Addressed the review — pushed 5 commits (63c0aa6..0877314).

Blockers

  • Publish workflow: refuses non-main refs, pushes the bump+tag to main before npm publish, git push --atomic; CI now runs Node 18/20/22.
  • Bindings resolved per-repo (no lexicographic shadowing): /api/oven-data/:id?repoKey= selects the repo's binding, falling back to the --oven-data override; DT dashboard rows are per bound repo.
  • Lifecycle crash-safety: target reclaim via rmdirSync (empty-only — never deletes a real target); close is resumable (repairs a moved-but-digest-less burnlist) and re-validates + re-gates before repair; empty stale reservations are reclaimed.
  • oven update now stages the package and swaps atomically (no more separate file writes).
  • Generic handler returns validated:false for discovered custom ovens.

Completeness

  • Added oven fork (writes the oven.json forkedFrom lineage, revision = source's ovenRevision).
  • Removed the legacy definition.md/dashboard.json/types/ fallbacks from the CLI (matches the server).

Deferred (documented): oven update is not yet a fully atomic read snapshot — a reader doing two sequential reads can still straddle the dir swap. The correct fix (immutable revision dirs behind a resolved-once pointer) is folded into the upcoming .oven/layout.json packaging work rather than duplicated here.

Scope unchanged: this is the framework slice; the .oven DSL, component library, and renderer deletion are the next PR. npm run verify green (229 tests), build + package + global-install pass, zero runtime deps, files <400 lines.

@apresmoi apresmoi changed the title feat: ovens plugin framework + review fixes + CI feat: ovens plugin framework + per-repo identity + review fixes Jul 14, 2026
@apresmoi
apresmoi force-pushed the feat/ovens-framework branch from b350447 to b668812 Compare July 14, 2026 18:09
@apresmoi
apresmoi force-pushed the feat/ovens-framework branch from b668812 to 8277b9a Compare July 14, 2026 18:16
@apresmoi
apresmoi merged commit a7779aa into main Jul 14, 2026
3 checks passed
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.

1 participant