Commit graph

24 commits

Author SHA1 Message Date
Resham Joshi
9ba327c3e2
Merge branch 'feat/core-extraction' into fix/ci-run-cli-suite 2026-08-21 08:14:28 -07:00
ozymandiashh
4a971ee8a7 ci: run the CLI suite
The repo moved to npm workspaces and CI followed the core package: there is a
job for typecheck, test, build, verify-dist and pack across three node
versions. Nothing runs the CLI's suite — roughly 2470 tests, including the 29
provider bridge suites that byte-compare against goldens captured before the
extraction. Issue #809 says every phase PR passes a byte-identical parity gate;
until now nothing enforced it.

Two things stood in the way. The CLI's test script was `vitest`, which is watch
mode — in CI that hangs a runner instead of failing. And the root test script
forwarded only to the CLI workspace, so core's guardrail suite never ran from
the command a contributor reaches for, while the CLI half of it could not run
from a clean checkout at all: core's exports resolve to dist, which is
gitignored.

The root script now builds core before running either suite. That costs a
build on every local run, which is a real annoyance, but the alternative is a
script that only works if you happen to have built core earlier.

The CLI job runs the suite on two node lines: the engines floor (22.13.x) and
24.x. The second leg is not matrix sprawl — the zed bridge parity suite seeds
its fixture with zlib's zstd, which only landed in 22.15, so a floor-only job
would silently skip the byte-compare gate this job exists to run and still go
green. The floor leg keeps the >=22.13 promise enforced; the 24.x leg makes
the parity gate actually execute. The job carries a 15-minute timeout —
measured wall time for the whole suite is ~2 minutes — so a hung run cannot
burn a runner for the default six hours, and the workspace-versions check runs
before npm ci: it only reads the three manifests and the lockfile, so a drift
fails in a second instead of after a full install.
2026-08-05 04:09:46 +03:00
ozymandiashh
c71f2cd667 ci: make the bracket-assign guard actually match its targets
The prototype-pollution rule has never fired. Its `paths.include` named the
pre-workspace layout (`/src/providers/*.ts`, `/src/parser.ts`) while the job
scans `packages/cli/src/...`, so the rule selected no files and the step was
green unconditionally.

Verified before and after: with the old rule and the old scan targets a
planted bracket-assign under packages/cli/src/providers/ reports 0 findings;
with this change the same violation is reported at the right file and line,
and the real tree scans 184 files clean.

Also brings packages/core/src/providers/** into scope. Provider decoding moved
there in the extraction, so that is where records from untrusted session logs
are now turned into maps — precisely what the rule exists to guard.

Two guard-rails so the step cannot silently go vacuous again:

- The step now fails when the scan selected no files. semgrep's --json
  `paths.scanned` reflects what the rule actually selected, not the raw scan
  targets (verified: with the include paths broken but the targets intact,
  scanned drops to 0 while the step still exits 0). A low-water mark was
  considered and rejected as brittle: the provider count is a moving target
  by design and CI installs semgrep unpinned, so a magic number would need
  constant bumping and would decay back into vacuity.

- The CLI providers glob is now recursive (`**/*.ts`) like core's. The
  directory is flat today, but a future nested provider directory would be
  scanned by CI and then silently excluded by the rule; a planted violation
  under providers/nested/ is now reported. The narrow whitelist is
  deliberate and unchanged in spirit: unrelated maps elsewhere in the tree
  stay out of scope.
2026-08-05 03:43:25 +03:00
Paul Logan
0ec9ea93cb fix: guard publish against a half-built dist
The build is `tsup && tsc`. tsup runs with clean:true, so it wipes dist and
writes JavaScript; if tsc then fails, dist holds .js with no declarations. The
build exits non-zero, but packages/core declared no prepublishOnly, so nothing
rebuilt at publish time and a later npm publish would ship it.

Reproduced: remove the declarations from a copy of dist and npm pack --dry-run
still succeeds, with all 41 exports subpaths pointing at files absent from the
tarball. npm pack was never the guard.

Adds prepublishOnly (build then verify) and scripts/verify-dist.mjs, which
asserts every exports target exists. CI runs verify-dist as well, so the guard
is exercised on every push rather than only on the rare publish.
2026-07-27 15:12:13 -07:00
Paul Logan
7e29455d4f ci: gate core builds and package integrity 2026-07-27 12:01:52 -07:00
iamtoruk
dc97ab4936 chore(workspace): move CLI to packages/cli, add @codeburn/core skeleton (phase 1) 2026-07-26 10:19:33 -07:00
reviewer
4c1aba1ae2 desktop: add Microsoft Store package workflow 2026-07-22 00:15:14 +02:00
iamtoruk
edc07c6149 chore(ci): bump GitHub Actions to Node 24 versions
Some checks are pending
CI / semgrep (push) Waiting to run
GitHub forces Node 20 actions to Node 24 on 2026-06-16. Bump to current
node24 runtimes (inputs verified unchanged):
- actions/checkout v4 -> v6
- actions/upload-artifact v4 -> v7
- softprops/action-gh-release v2 -> v3
2026-06-10 01:11:08 +02:00
iamtoruk
909efcf989 Harden menubar refresh and installer 2026-05-14 18:32:15 -07:00
iamtoruk
4737bfb1fa Contribution rules: require real-data testing for new providers, one PR at a time 2026-05-11 20:04:18 -07:00
iamtoruk
1149ab6e43 Fix menubar wake recovery and release asset selection 2026-05-11 10:57:02 -07:00
iamtoruk
15334fac67 Add SHA-256 checksum verification to menubar installer
The installer now downloads and verifies a .sha256 companion file
before extracting and launching the menubar app. Build script and
CI workflow generate the checksum alongside the zip. Adds SECURITY.md
with reporting instructions.

Addresses #215.
2026-05-04 10:08:58 -07:00
iamtoruk
b3bb5efc58 chore: enable firstlook workflow_dispatch for backlog scans
Adds pr-number input and workflow_dispatch trigger so existing open PRs
can be scanned without waiting for a new push. Leave pr-number empty to
loop all open PRs; supply a number to rescan one.
2026-04-21 06:33:09 -07:00
iamtoruk
2ed1d5275c chore: add firstlook workflow for PR author reputation check
Runs on every PR open/reopen/synchronize against getagentseal/firstlook
and fails the check when the author's score is 'unknown' (new or
untracked accounts). Skips bot accounts so dependabot and renovate pass
through.

This screens the same drive-by pattern that landed in PR #118 (octo-patch,
fresh automation account) without requiring a manual tier check on every
submission.
2026-04-21 06:17:56 -07:00
Ninym
5932a273a1
chore(ci): add semgrep guard against prototype pollution regressions in provider hot paths (#78)
* chore(ci): add semgrep rule no-bracket-assign-on-literal-object-map

* chore(ci): add workflow running semgrep bracket-assign guard on push/PR

* fix(parser): use Object.create(null) for categoryBreakdown map

* chore(ci): expand semgrep rule to cover ||, ??=, and if-guard variants

* chore(ci): limit push trigger to main and add semgrep --strict

* chore(ci): use jq to enforce finding count (--error unreliable in semgrep 1.x)
2026-04-18 15:10:24 -07:00
AgentSeal
9ac2144950 revert: remove npm OIDC publish workflow
Three consecutive failed publish attempts on a live repo are not
acceptable. Reverting to manual `npm publish` from the laptop, which
has always worked. OIDC can be revisited later in a staging
environment, not on the production package.
2026-04-18 09:51:58 -07:00
AgentSeal
4fccca47d2 fix(ci): use Node 24 for npm OIDC trusted publishing
Node 22 on GitHub's hosted runners currently pins to a broken npm
10.9.7 whose internal `promise-retry` module is missing from the
toolcache (runner-images#13883, nodejs/node#62430). Self-upgrading
via `npm install -g npm@latest` crashes before the install can run,
because `@npmcli/arborist` cannot start without that module.

Node 24 LTS bundles npm 11.x natively, which supports OIDC trusted
publishing out of the box (minimum is 11.5.1, per npm docs). Bumping
the runtime lets us delete the fragile upgrade step entirely.

Test: tag `v0.7.4-rc.2` after merge to validate the flow publishes
successfully with provenance.
2026-04-18 09:46:13 -07:00
AgentSeal
832dd4ada1 fix(ci): upgrade npm to 11.5.1+ for OIDC trusted publishing
Node 22 ships with npm 10.x, which does not know how to exchange the
GitHub OIDC id-token for a short-lived npm token. Without this upgrade,
the publish step silently falls back to the empty NODE_AUTH_TOKEN that
setup-node writes to .npmrc, and the registry returns 404.

First test publish (v0.7.4-rc.0) failed at exactly this point, even
though provenance signing via sigstore succeeded, confirming the OIDC
handshake with GitHub was fine and only the npm-side auth was broken.

Fix: `npm install -g npm@latest` before the publish step. Adds ~5s to
runtime.
2026-04-18 09:33:52 -07:00
AgentSeal
882deafc2b
Merge pull request #84 from AgentSeal/feat/npm-oidc-publish
CI: npm OIDC trusted publishing workflow
2026-04-18 09:10:56 -07:00
AgentSeal
e834f64c22 ci: block Co-authored-by Claude/Anthropic trailers on PRs
New GitHub Actions check that scans every PR commit for
`Co-authored-by: ... claude ...` or `... anthropic ...` trailers and
fails the PR with a clear remediation message if found. Contributors
can still use AI tools; the trailer attribution must be removed before
the PR is eligible to merge, consistent with the project contributor
guidelines.

The workflow scans only commits introduced by the PR
(base.sha..head.sha), so existing history is untouched.
2026-04-18 09:02:48 -07:00
AgentSeal
d80f68928b ci: add npm OIDC trusted-publish workflow
Triggers on v* tag push or manual dispatch. Builds, tests, then publishes
codeburn to npm with provenance attestation. Uses OIDC so no NPM_TOKEN is
stored in repo secrets. The npm-publish GitHub Environment gates the
publish step behind a required reviewer, so every release needs explicit
human approval before it reaches the registry.

Tag/package version mismatch fails fast before any build work. Tests run
before publish to prevent shipping a broken release.
2026-04-18 07:43:06 -07:00
Resham Joshi
0b96ff182e docs: scrub private strategy notes from public text
Removes references to future signing decisions, dollar amounts, and
star thresholds from the menubar README, the CHANGELOG, the release
workflow (its YAML comments and the auto-generated release body), and
the packaging script. The technical description stays; the 'we are
not paying for X right now' framing is out.
2026-04-17 17:12:48 -07:00
Resham Joshi
495a254338 feat(mac): native Swift menubar app + one-command install
Introduces mac/ with a native SwiftUI menubar app that replaces the
previous SwiftBar plugin entirely. Install via `npx codeburn menubar`,
which downloads the .app from GitHub Releases, strips Gatekeeper
quarantine, and drops it into ~/Applications.

Highlights

- mac/ SwiftUI app: agent tabs, Today/7/30/Month/All period switcher,
  Trend/Forecast/Pulse/Stats/Plan insights, activity + model
  breakdowns, optimize findings, CSV/JSON export, Star-on-GitHub
  banner, live 60s refresh, instant currency switching with offline FX
  cache.
- Security: CodeburnCLI argv-based spawn (no shell interpretation),
  SafeFile symlink guards + O_NOFOLLOW writes, FX rate clamping to
  [0.0001, 1_000_000], keychain filtered to account == "default",
  removed byte-window credential log, in-flight refresh guard, POSIX
  flock on config.json writes, TerminalLauncher validates argv before
  AppleScript interpolation.
- Performance: shared static NumberFormatter (thousands of allocations
  per popover redraw eliminated), concurrent pipe drain with 20 MB cap
  + 60s timeout in DataClient, Observation-tracked reactive UI, 5-min
  payload cache keyed on (period, provider).
- CLI: new `codeburn menubar` subcommand that downloads + installs +
  launches the .app (no clone, no build). New `status --format
  menubar-json` payload builder. `export` rewritten to produce a
  folder of one-table-per-file CSVs with a `.codeburn-export` marker
  so arbitrary -o paths cannot be silently deleted.
- Removed: src/menubar.ts (SwiftBar plugin generator),
  install-menubar / uninstall-menubar subcommands, `status --format
  menubar` directive output, tests/menubar.test.ts,
  tests/security/menubar-injection.test.ts.
- Release: .github/workflows/release-menubar.yml builds universal
  binary, assembles .app, ad-hoc signs, zips, uploads on mac-v* tag
  push. Runs on the free macos-latest runner.

Tests

- 230 TypeScript tests pass
- 10 Swift CapacityEstimator tests pass
- TypeScript typecheck clean
- Swift release build clean
2026-04-17 16:55:56 -07:00
AgentSeal
00afed6930 v0.1.0 - initial release
Interactive TUI dashboard for Claude Code token observability.
13-category task classifier, per-project/model/tool breakdowns,
gradient bar charts, SwiftBar menu bar widget, CSV/JSON export.
2026-04-13 15:10:27 -07:00