Commit Graph

6 Commits

Author SHA1 Message Date
Matt Kane bb9bc26f6c ci: host plugin tarballs as release assets, drop marketplace seed (#1353)
* ci: host plugin tarballs as release assets, drop marketplace seed

Attach each published sandboxed plugin's bundle to the GitHub release
changesets creates, giving the decentralized registry (RFC 0001) a
stable public URL per version. Remove the legacy marketplace seed
workflow, which has been failing since the post-#1057 plugin layout
broke its bundler and is superseded by the registry.

* ci: harden plugin tarball attach script

Address review feedback: guard per-directory package.json parsing so one
bad manifest doesn't abort the step, treat an empty PUBLISHED_PACKAGES
output as no-op, and fail fast when GITHUB_REPOSITORY is missing. Note
the publish-only path limitation in the workflow.
2026-06-05 11:08:54 +01:00
Matt Kane c8b6fc014b feat: PR review-state labels and review-queue CLI (#1214)
* feat: add review-state labels and review-queue CLI

* fix: address review feedback (zizmor allowlist, sweep concurrency, label wording, CLI guards)

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-29 18:24:04 +00:00
Matt Kane 74a9078b00 ci(release): reconcile lockfile before gated changeset commands (#1104)
* ci(release): reconcile lockfile before gated changeset commands

verifyDepsBeforeRun: error gates pnpm run/exec. The frozen install in the release job does not refresh the lockfile's overrides hash, so a lockfile whose overrides drifted from pnpm-workspace.yaml passes the frozen install but trips the gate on `pnpm run changeset:version` / `pnpm changeset publish`, killing every release before it versions or publishes. A non-frozen install is not gated and reconciles the hash; changesets/action commits the result, self-healing the repo.

* ci(release): reconcile lockfile inside the changeset command, not as a prior step

changesets/action does git checkout changeset-release/main + git reset --hard right before running the version/publish command, so any reconcile placed in an earlier workflow step is discarded by that reset and the gated 'pnpm changeset' call still trips verifyDepsBeforeRun. Move the non-frozen install into a single non-gated node entrypoint the action invokes, so it runs after the action's git work and immediately before the gated pnpm call. Drop the now-unreferenced changeset:version script.

* style: format

* ci(release): use --prefer-frozen-lockfile for the reconcile

changeset publish rebuilds packages via prepublishOnly at pack time. A non-frozen reconcile could re-resolve in-range transitive deps so shipped bits diverge from tested bits. prefer-frozen reconciles the deps state to satisfy verifyDepsBeforeRun without re-resolving when the lockfile is satisfiable, and falls back to a full install (e.g. after changeset version bumps workspace versions) when it isn't.

* ci(release): revert reconcile to --no-frozen-lockfile

The PR's purpose is to reliably clear ERR_PNPM_VERIFY_DEPS_BEFORE_RUN. --no-frozen-lockfile is pnpm's documented remediation and unconditionally refreshes the deps-state hash. --prefer-frozen-lockfile's fast path is gated by a satisfiability check that may not include the settings hash, so it could skip the rewrite in exactly the stale-metadata case this fixes. The shipped-vs-tested concern that motivated prefer-frozen is low-probability, pre-existing, and negligible when the lockfile is satisfiable (no re-resolution occurs).

---------

Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
2026-05-19 20:00:37 +01:00
Matt Kane f27ba9240e ci(bonk): add auto-implementer agent and refresh stale docs (#846)
The /bonk workflow ran on the default opencode build agent with the
maintainer's comment as the entire prompt, so investigation depth and
reproduction discipline were left to the model. The /review workflow
already gets this right via the auto-reviewer custom agent.

Adds .opencode/agents/auto-implementer.md, mirroring the auto-reviewer
pattern. The agent file holds mode classification, investigation
protocol, TDD reproduction discipline, and EmDash-specific diagnostic
notes (locale filters on content tables, API envelope shape, sibling
bug clustering, requirePerm/requireOwnerPerm, requestCached, globalThis
singletons, dialect-agnostic test setup). Defers AGENTS.md rules to
AGENTS.md instead of duplicating.

Updates bonk.yml to wire in the agent and inject structured trigger
context (kind, number, title, body, head/base SHAs) the same way
review.yml does, so the agent does not need to discover what it is
looking at.

Doc corrections found while validating the agent against current code:

- bonk.yml / review.yml: header comments listed nonexistent gpt and
  gemini aliases. The current registry has only opus (default) and
  kimi. Updated to match.
- bonk-models.json and resolve-bonk-model.mjs: removed hard-coded
  opencode 1.4.6 references; the workflows pin 1.4.11.
- AGENTS.md: globalThis singleton example pointed at
  bylines/index.ts (bylinesHolder) which no longer matches; updated
  to settings/index.ts (SITE_SETTINGS_CACHE_KEY / holder) which is
  the current canonical example. Also fixed the migration
  registration path: database/runner.ts to
  database/migrations/runner.ts.
- skills/emdash-cli/SKILL.md: field types list was incomplete; added
  select, multiSelect, slug, url, file and pointed at
  FIELD_TYPE_TO_COLUMN as the source of truth.
2026-04-30 11:35:05 +00:00
Matt Kane 9484fa304d ci(bonk): keyword-based model selection for /bonk and /review (#844)
* ci(bonk): route /bonk and /review by keyword to selectable models

Drops /ultrabonk and /ultrareview in favour of a first-word keyword that
picks a model alias from .github/bonk-models.json:

  /bonk                 -> gpt (default)
  /bonk opus   ...      -> Claude Opus 4.7 (deep dive; replaces /ultrabonk)
  /bonk gemini ...      -> Gemini 3.1 Pro (wide-context, multimodal,
                            cross-family second opinion)
  /bonk kimi   ...      -> Kimi K2.6 (cheap pass for tiny PRs)

Same grammar applies to /review and @ask-bonk. Unknown or absent words
fall back to the registry default. .github/scripts/resolve-bonk-model.mjs
parses the body, looks up the alias, and emits OPENCODE_CONFIG_CONTENT
so adding or tuning a model is a JSON edit only -- no workflow churn.

Each frontier alias carries provider-native reasoning controls:
- opus:   effort=xhigh, thinking.type=adaptive (Anthropic's recommended
          starting point for coding/agentic work; replaces the deprecated
          thinking.budgetTokens shape no longer supported on Opus 4.7)
- gpt:    reasoningEffort=high, reasoningSummary=auto
- gemini: thinkingConfig.thinkingLevel=high, includeThoughts=true
- kimi:   native reasoning via the model declaration; no per-call toggle

The /review opus path also injects an extra agent-prompt line asking for
deeper cross-file and sibling-asymmetry analysis, preserving the prior
/ultrareview behaviour.

* style: format

* docs(pr-template): ask for the model/tool name next to the AI disclosure box

A bare "AI-generated code" tick is less useful than knowing which model
produced the work -- it lets reviewers calibrate where to look harder
and lets us track which models are producing reliable contributions.
Updated the template, AGENTS.md (both PR-flow mentions), and the
AI-generated PRs section in CONTRIBUTING.md.

* ci(review): drop the /review opus-specific prompt nudge

The auto-reviewer agent already sets the depth ceiling; an extra
"escalation" framing line was redundant and assumed a single intent
behind /review opus that no longer matches the wider keyword grammar.

* docs(pr-template): reframe model-name rationale around cross-family review

The reason for asking which model wrote the code is so reviewers can
pick a different model family for the review pass -- different families
have different blind spots. It is not about ranking which models
produce "reliable" contributions.

---------

Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
2026-04-30 07:10:10 +00:00
Matt Kane ba12ca5ee3 revert: undo accidental major and prevent recurrence (#796)
* revert: undo accidental 1.0.0 release; prevent recurrence

Reverts 46f3acb (ci: release #759), which bumped all 8 publishable
packages to 1.0.0. Restores 0.7.x versions and pending changesets so
the next release lands at 0.8.0.

Root cause: peer-dep cycle between `emdash` and `@emdash-cms/auth-atproto`,
both using `workspace:*`. Changesets resolves `workspace:*` to the exact
current version for semver checks, so a minor bump on either side falls
outside the range and escalates the cycle's other side to major. Other
plugins use `workspace:>=X.Y.Z` and don't trip this — switching both
ends of the cycle to the same form fixes the escalation.

The existing workflow guard greps `pnpm changeset status` for "bumped
at major", which only runs at PR-creation time. Once the version PR is
merged, no changesets are pending and the grep returns nothing — so
the publish step proceeded with already-bumped 1.0.0 versions.

Replaces it with a package.json scan that fails on any non-private 1.x
version. Wired into both `release.yml` (publish-time) and `ci.yml`
(every PR, including the auto-generated Version Packages PR).

Also adds .claude/* to .gitignore (mirroring the .opencode pattern)
so local agent state doesn't accidentally land in commits.

* style: format

* chore: update lockfile for workspace range changes

---------

Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
2026-04-27 21:00:59 +01:00