Commit Graph

107 Commits

Author SHA1 Message Date
can1357 ff5b06d0c2 ci: added CI workflows and actions for pinned toolchain-native builds
- Added composite GitHub actions to ensure rust toolchains and cargo helpers.
- Added a kata-native build action with variant checks and platform artifact uploads.
- Reworked CI matrices to split native cross-platform jobs and gate releases accordingly.
- Updated runner bootstrap and image to preinstall pinned build tools for CI consistency.
2026-06-15 01:01:45 +02:00
can1357 82871093bd ci(actions): skipped bun setup and rust-cache on shared-sccache runners
- Updated the bun-install composite action to detect preinstalled Bun and only fetch it when missing.
- Added cache-backend detection and wiring so Bun dependencies use RustFS cache when SCCACHE credentials are present.
- Conditionally skipped rust-cache in build-native and CI jobs when shared sccache runners are available, relying on the existing RustFS/sccache layer instead.
2026-06-15 00:52:32 +02:00
can1357 2be8256af0 ci(workflows): shared bun caching in CI via backend-aware install action
- Updated CI dependency install flow to share bun cache orchestration across jobs.
- Added RustFS-backed bun cache restore/save script keyed by bun.lock hash.
2026-06-15 00:18:43 +02:00
can1357 6d8bd80392 ci(workflows): share rust sccache via in-cluster RustFS S3 on self-hosted runners
Self-hosted omp-kata runners now inject a shared S3 (RustFS, in-cluster)
sccache backend via pod env (SCCACHE_BUCKET/ENDPOINT/REGION + AWS creds).
The Enable-sccache step branches on SCCACHE_BUCKET: when set, sccache reads
the S3 config from the inherited environment; otherwise GitHub-hosted
runners (macOS, ubuntu-arm) keep the GHA cache backend since they can't
reach the private RustFS.
2026-06-14 23:07:54 +02:00
can1357 3843a86df9 ci(workflows): updated CI job labels and removed fast test dependency
- Renamed the coding-agent native job and bucket names from tooling to unit in CI.
- Removed test_coding_agent_fast from the release job dependency list and gating condition.
2026-06-14 22:40:21 +02:00
can1357 b8e4da23d0 ci(ci): refactored CI setup and test-state isolation for coding-agent workflows
- Added a setup-system-deps action with preloaded-runner guards and apt fallbacks.
- Updated CI workflows to download Linux x64 native artifacts and gate on native job success.
- Renamed coding-agent fast mode to singleton in scripts and test partitioning logic.
- Added settings test-state begin/restore helpers with recursive cleanup in affected tests.
2026-06-14 22:37:05 +02:00
can1357 a734c29234 ci(scripts): reworked CI test execution with mode-based TypeScript buckets
- Added a mode-based `ci-test-ts.ts` runner with `--dry-run` support.
- Partitioned coding-agent tests into fast/ui/runtime/native/heavy buckets and separated workspace/native runs.
- Added coding-agent bucket modes that fail CI when a target bucket has no matching tests.
- Updated CI scripts/workflow to run the new TS buckets, use `omp-kata`, and gate releases on them.
2026-06-14 21:55:55 +02:00
can1357 73f2dbc3b5 ci(workflows): isolated manual workflow_dispatch runs in release concurrency groups
- Updated the CI workflow concurrency rules to treat `workflow_dispatch` like a release path, grouping those runs by SHA and disabling cancel-in-progress.
- Extended the `GhaEval` expression evaluator in `scripts/ci-concurrency.test.ts` to support `==`/`!=` and align falsy checks.
- Added a regression test covering tagged-main `workflow_dispatch` runs using the release-style concurrency behavior.
2026-06-14 19:04:05 +02:00
roboomp 9acc24329f fix(ci): scope release runs to per-sha concurrency group
The workflow-wide concurrency group was `${{ github.workflow }}-${{ github.ref }}`
with `cancel-in-progress: true`, so the release-script's atomic
`refs/heads/main + v* tag` push shared the `CI-refs/heads/main` group with every
later main push. The newer run cancelled the older release run before
`release_binary` / `release_github` / `release_npm` could execute, and no
future run carried the tag at HEAD, so the tag stayed published-as-a-ref but
unreleased on GitHub and npm (v15.12.6 in the wild).

Release runs are now routed to a per-sha group with `cancel-in-progress: false`
when either:
  * the push subject starts with `chore: bump version to ` (the release-script
    commit convention from scripts/release.ts), or
  * `github.ref` is a `v*` tag (workflow_dispatch recovery from a tag ref).

Other events keep the cheap branch-wide cancel-in-progress for PR/main churn.
release.ts's retry hint now uses the same release commit subject so manual
retries also land in the per-sha group.

Added scripts/ci-concurrency.test.ts: a regression test with a minimal GHA
expression evaluator that asserts the resolved group / cancel-in-progress for
auto-release pushes, retry pushes, tag-ref dispatches, plain main pushes, PRs,
distinct release shas, and a benign `revert: chore: bump version to ...`
follow-up.

Fixes #2564
2026-06-14 12:23:23 +00:00
can1357 8fa1f6c250 feat: added shared collab wire protocol and web guest collaboration client
- Added @oh-my-pi/pi-wire and reworked collab protocol types into shared contracts.
- Added wire-compatibility guards in coding-agent host to block unsupported events.
- Added standalone collab-web package with guest UI, mock-host tooling, and local relay.
- Added secure room-link validation, WebCrypto framing, and safer socket routing.
2026-06-12 11:54:41 +02:00
can1357 96defff9a5 ci(workflows): provisioned native addons for the npm publish job
The pi-coding-agent prepack (bundle-dist.ts) imports the pi-utils barrel,
which eagerly loads the pi-natives addon; release_npm never downloaded the
linux x64 .node artifacts, so the publish died in prepack. Mirror the
test job's download-artifact step (release runs always rebuild natives in
the same run, so the default run-id resolves).
2026-06-10 08:22:19 +02:00
can1357 61c2e29532 ci(ci): aligned CI release metadata flow after job and output renames
- Renamed the gate and native jobs in CI for consistent release naming.
- Renamed reusable-artifact output keys for native lookup compatibility.
- Rewired release and test jobs to read tags, flags, and hashes from metadata outputs.
2026-06-08 12:26:31 +02:00
can1357 392636d315 ci(workflows): gated Homebrew tap publish on release verification
- Updated the `release_brew` job to depend on `release_github_verify` instead of `release-github`.
- Changed the job guard so the tap release now requires `release_github_verify` to report success before running.
- Updated the workflow comment to describe that tap publishing is gated by verified release binaries.
2026-06-08 12:09:17 +02:00
can1357 af33d4bfe4 ci: added macOS release signing and Homebrew automation to CI
- Added macOS CI signing and notarization steps when APPLE_* secrets are configured.
- Added strict darwin verification checks to reject ad-hoc signatures and run smoke tests.
- Added Homebrew formula publishing from release assets with SHA-256 checksums.
- Added helper scripts for signing secret upload, entitlements, and release workflows.
2026-06-08 11:49:28 +02:00
can1357 7ffec14863 ci: force JavaScript actions to run on Node 24 2026-06-08 00:32:47 +02:00
can1357 71fe258320 ci: migrated release trigger from tag-push to branch-push
- Removed `tags: ["v*"]` trigger; release now fires from the single atomic `main` push that carries the tag.
- Replaced `gate.skip` with `gate.is-release` and `gate.release-tag` so downstream jobs detect the tag via `git tag --points-at HEAD`.
- Passed `release-tag` explicitly to release steps (gh-release, curl, release notes) since `github.ref` is now `refs/heads/main`, not the tag.
- Fixed rust-cache key collision on macOS x64 by setting `RUSTFLAGS` (target-cpu) before cache restore and including the native source hash in the shared key.
2026-05-31 02:33:19 +02:00
can1357 d0d5a6d60f config: disabled GITHUB_ACTIONS marker for TypeScript test script
- Updated the root package.json test:ts script to run with GITHUB_ACTIONS=0.
2026-05-31 01:14:52 +02:00
can1357 c7c627f0c5 ci(ci): published native leaf packages per target in the release flow
- CI now enabled OIDC publishing in the build matrix, installed Node 24/npm, and added a per-target native addon publish step.
- The release script now accepts `--native-leaf <tag>` and publishes only the matching generated native leaf package.
- Native package generation gained optional tag filtering with validation of requested leaf tags for targeted release publishing.
2026-05-30 19:22:36 +02:00
can1357 464314e3a2 fix(ci): scope fetch-tags to main pushes to unbreak tag-triggered checkout 2026-05-30 19:06:44 +02:00
can1357 e1a0d235ec ci(scripts): skipped duplicate release CI runs and enabled OIDC npm publishes
- Added a workflow `gate` job that marks `main` pushes with a `v*` tag at `HEAD` as duplicate release runs.
- Conditioned native, lint/test, and install CI jobs on that gate so redundant build and publish work is skipped on duplicate tagged pushes.
- Updated `scripts/ci-release-publish.ts` to publish packed tarballs via `npm publish` after `bun pm pack`, handling already-published versions as a no-op.
2026-05-30 18:28:50 +02:00
can1357 58d95ae258 ci: set CARGO_INCREMENTAL=0 to prevent sccache from being bypassed
- sccache silently skips caching when incremental compilation is enabled, making the wrapper a no-op.
- Applied fix to both the shared build-native action and the CI workflow setup step.
2026-05-27 02:09:14 +02:00
can1357 3514ea3cfa ci(actions): enabled cross-compilation toolchains across CI native and release builds
- Updated the build-native action to install cargo-zigbuild for non-MSVC targets and cargo-xwin with LLVM tooling for MSVC targets.
- Removed the fixed aarch64 linker variable and narrowed Rust test execution to skip duplicate macOS runs.
- Reworked CI matrices to build win32-x64 artifacts on ubuntu with x86_64-pc-windows-msvc and simplified smoke testing to skip those Windows binaries via matrix gating.
2026-05-27 01:54:26 +02:00
can1357 db3362be95 ci(workflows): optimized CI native artifact reuse and added sccache fallback
- Updated `rust-hash` to return separate `linux-run-id` and `release-run-id` outputs by checking each prior run for required native artifacts.
- Rewired `native_linux` and `native_release` gating to use those outputs, enabling Linux cache reuse on main and release pre-warm only when all cross-platform artifacts are present.
- Enabled sccache in both the shared native build action and CI setup, and excluded macOS workspace Rust tests from the generic native test step due to duplicated coverage.
2026-05-27 01:33:09 +02:00
can1357 bc355472af ci(ci): added automated release note generation to the GitHub release workflow
- Added a Bun-based `scripts/ci-release-notes.ts` utility that extracts `## [version]` entries from `packages/*/CHANGELOG.md` and writes a combined `release-notes.md` for the release tag.
- Updated the GitHub release workflow to install Bun, run the notes generator, and pass the generated `release-notes.md` to `softprops/action-gh-release` via `body_path`.
2026-05-26 20:53:59 +02:00
roboomp a6279e0730 fix(cli): restored binary update rollback
Rolled back binary updater replacements when post-install version verification fails instead of deleting the previous working binary first.

Added a release workflow gate that downloads the published macOS arm64 asset and verifies codesign plus --version before npm publishing.

Fixes #1240
2026-05-21 00:09:43 +00:00
can1357 f51d058c43 ci(workflows): set GITHUB_ACTIONS to an empty value for the
- Set `GITHUB_ACTIONS` to an empty value for the `Test workspace (TS)` step so Bun's `::group::` markers are not emitted as log text.
- Kept the override scoped to that step to avoid impacting other workflow steps while preserving normal annotation behavior.
2026-05-19 17:20:43 +09:00
roboomp 9d0826266c fix(release): listed worker --compile entrypoints in CI release script
- Added stats sync, browser tab, and JS eval workers as explicit --compile
  entrypoints in scripts/ci-release-build-binaries.ts so Bun emits them
  into bunfs in published binaries, matching the dev build script and the
  AGENTS.md worker spawn contract.
- Switched the release-binary smoke step in .github/workflows/ci.yml to
  invoke --smoke-test (in addition to --version) so this regression
  cannot ship again.
- Added packages/coding-agent/test/issue-1150-repro.test.ts pinning the
  symmetric contract: both build scripts must list every worker entry.

Fixes #1150
2026-05-17 11:52:01 +00:00
can1357 7abac9f96e ci: split native job into linux and release-only platform jobs
- Extracted repeated build steps into a reusable `build-native` composite action.
- Split `native` into `native_linux` (runs on every PR) and `native_release` (tags only).
- Release jobs now always use same-run artifacts, removing cross-run artifact resolution logic.
2026-05-17 05:14:18 +02:00
can1357 b02f54402b ci(workflows/ci): prepended rustup toolchain bin to PATH so macos cargo lookups dodge homebrew shadow 2026-05-13 06:47:37 +02:00
can1357 a5a06c1be8 ci: drop x86-64-v3 native variants for win32/darwin-x64 and clean up release flow
- Drop the modern (x86-64-v3) native build matrix entries for darwin-x64 and
  win32-x64. Linux x64 still ships both variants. Loader fallback chain
  (modern -> baseline -> default) means hosts on those platforms now load
  baseline; npm install via @oh-my-pi/pi-natives and the embedded standalone
  binary both keep working unchanged.
- Stop downloading .node files in scripts/install.sh and scripts/install.ps1.
  The standalone omp binary embeds the native at compile time, so the
  separate downloads were redundant and were going to 404 on platforms with
  no modern variant.
- Stop publishing standalone .node files to GitHub Releases. The npm
  registry is the only consumer that needs them.
- Drop the release-archives build entirely (omp-*.tar.gz). Nothing
  consumed them. Deleted scripts/ci-release-build-archives.ts and the
  ci:release:build-archives package script.
- Split the monolithic release job into release-github (download omp-*
  binaries, upload to GitHub Release) and release-npm (download natives,
  bun publish). Each job's steps now obviously serve its single output.
2026-04-30 14:42:24 +02:00
can1357 7015f6dfd2 ci: drop zig 2026-04-30 14:25:01 +02:00
can1357 bfddf9bf47 ci(workflows): added rust-hash CI flow to skip redundant native builds 2026-04-30 14:11:48 +02:00
can1357 5ecd041bfe fix: patched bash interceptor, LSP shutdown, and concurrent command tracking
- Fixed bash interceptor to check both raw and cwd-normalized commands, catching commands hidden behind leading `cd ... &&` wrappers.
- Fixed LSP client shutdown to await graceful shutdown with a 5s timeout before killing the process, and parallelized `shutdownAll` via `Promise.allSettled`.
- Fixed concurrent bash command tracking by replacing a single abort controller with a Set, preventing premature cancellation of parallel commands.
- Removed `./hooks` and `./hooks/*` export entries from the coding-agent package exports map.
- Updated pinned Rust nightly toolchain from `nightly-2026-03-27` to `nightly-2026-04-29` in `rust-toolchain.toml` and CI workflow.
- Replaced custom already-published detection in `ci-release-publish.ts` with `bun publish --tolerate-republish` flag.
2026-04-30 05:51:01 +02:00
can1357 5544db9759 fix(release): package compatible native addons
Fixes #634

Fixes #684

Fixes #727

Fixes #754
2026-04-24 01:02:50 +02:00
fettpl 14b08f89d4 fix: restore runnable darwin compiled binaries
fixes #754
2026-04-23 22:59:27 +02:00
Sam Biggins ece12b16bb ci: removed dangling references to ci:check:affected and ci:test:affected
Commit afa4eb71f ("removed turbo-based workspace pipeline") dropped the
affected-script entries from package.json but left .github/workflows/ci.yml
still invoking them on the pull_request branch of the check/test jobs. Every
PR since that commit has failed both jobs with "Script not found".

The push-to-main branch (ci:check:full / ci:test:full) already works. Drop
the dead pull_request-conditional steps and remove the corresponding
'if: github.event_name != pull_request' guard on the :full steps so they
run in both contexts.

fixes #730
2026-04-18 22:30:18 +02:00
can1357 afa4eb71f1 refactor(deps): removed turbo-based workspace pipeline in favor of bun workspaces
- Removed Turborepo cache steps from CI and dropped .turbo from gitignore.
- Migrated root scripts from turbo commands to bun workspace execution for build, test, lint, check, format, and fix.
- Removed turbo dependencies and deleted turbo.json task configuration files from the repository.
2026-04-13 06:19:12 +02:00
can1357 bb550efc6b chore: cleaned up documentation, test infrastructure, and dependencies across tooling
- Enhanced chunk-edit tool documentation with clarifications on @decl region behavior and guidance for attribute/decorator modifications.
- Improved chunk edit implementation to handle @body region scanning and markdown blank-line preservation with additional test coverage.
- Added oracle model review synthesis to rate-edit-tool.py for aggregating findings across multiple model reviews.
- Updated test infrastructure to run TypeScript and Rust tests in parallel using cargo nextest with improved logging control.
- Updated TypeScript dependencies including @typescript/native-preview and typescript to latest versions.
2026-04-10 15:53:41 +02:00
can1357 d93a941870 fix(ci): accept napi plain platform filename and pass TARGET_VARIANTS
- resolveBuiltAddonPath: napi-rs 3.x emits pi_natives.<platformArchABI>.node
  where platformArchABI is e.g. darwin-x64 (no ABI). The previous filter
  excluded the plain <platform>-<arch>.node form because it was in the
  canonicalFilenames set, breaking darwin-x64 tag builds. Only exclude
  sibling variant-tagged files (modern/baseline) that do not match our
  target canonical name.
- ci.yml: pass matrix.variants as TARGET_VARIANTS so ci-build-native.ts
  actually builds both baseline+modern on x64 platforms in tag releases.
2026-04-09 03:33:11 +02:00
can1357 52719d1a7c refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
2026-04-08 17:05:20 +02:00
can1357 838d1a4e87 fix(ci): add bun install to native job for napi CLI 2026-04-07 06:02:11 +02:00
can1357 cc4b3f270f fix(ci): add --external mupdf to release build_binary function
The previous fix (513982b16) only added --external mupdf to the
package.json build:binary script, but the CI release job uses its
own inline build_binary function that was missing the flag. This
caused the release job to fail on tag push v13.17.3 with a
top-level await error from mupdf via markit-ai.
2026-04-01 23:47:57 +02:00
can1357 2e0186a952 fix(ci): resolve gh_run_watch test hang and hardcoded path
- abortableSleep used Bun.sleep which vitest fake timers do not intercept;
  switch to setTimeout via Promise.withResolvers so vi.useFakeTimers() +
  vi.advanceTimersByTime() work correctly in the polling loop tests
- getCurrentHeadSha() and GhRunWatchTool session cwd used a hardcoded
  /work/pi path; replace with import.meta.dir so the tests resolve the
  real repo HEAD on any machine
- add timeout-minutes: 30 to the CI test job as a safety net against
  future hangs blocking release runs
2026-04-01 20:18:23 +02:00
can1357 4b1d5ebb0b ci: enabled workspace crate caching in Rust cache action
- Enabled workspace crate caching in Rust cache action across three CI jobs for faster builds.
2026-04-01 07:45:00 +02:00
can1357 2185f32363 fix: publish packages in dependency order 2026-04-01 06:08:13 +02:00
can1357 14f2589b3a fix(ci): drop target-cpu=x86-64-v3 from test jobs 2026-03-29 18:23:33 +02:00
can1357 538e4e07e8 fix(ci): add rustup target fallback for pinned nightly cross-compile 2026-03-28 15:07:18 +01:00
can1357 eb7914e03a fix(ci): pin nightly to 2026-03-27 to avoid codegen SIGILL regression
Today's nightly produces illegal instructions when compiled with
-C target-cpu=x86-64-v3. Reverts the unnecessary rustc-hash pin from
the previous commit since the real cause is the nightly compiler.

Also lets Cargo.lock return to rustc-hash 2.1.2 (not the culprit).
2026-03-28 14:39:55 +01:00
can1357 8986825938 fix: install zig in CI 2026-03-27 11:54:16 +01:00
can1357 82e4f168b9 feat: implemented background model discovery with provider caching for faster startup
- Added background model discovery with provider status tracking and 24-hour model caching to improve startup performance.
- Changed model discovery timeout from 3000ms to 250ms and deferred blocking refresh to background operations for faster initialization.
- Fixed model discovery to preserve cached models when providers are unavailable or unauthenticated.
- Added validation in Kitty key formatting to reject unsupported modifiers and improved error handling.
- Reorganized CI workflow to run TypeScript linting in check job and conditional Rust checks in native job matrix.
- Updated system prompt and tool guidance to recommend combined investigation-and-edit workflows and maintainable code practices.
2026-03-10 07:08:00 +01:00