Commit Graph

143 Commits

Author SHA1 Message Date
YeonGyu-Kim e2d73f482a ci: run pure bun test in workflows
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-06 18:45:33 +09:00
YeonGyu-Kim 63aa1c3e1d ci: use run-ci-tests.ts for mock isolation in CI workflow 2026-04-05 01:16:16 +09:00
YeonGyu-Kim 01994e3f65 ci: sync publish.yml test job with CI.yml isolation pattern 2026-04-05 01:12:54 +09:00
YeonGyu-Kim da86b57f23 test: fix CI test isolation - upgrade Bun, fix mock contamination and fresh-import patterns 2026-04-05 01:01:19 +09:00
YeonGyu-Kim 1071d4defb Pin Bun to 1.3.10 in CI and remove test:ci script
- Pin bun-version to 1.3.10 across all CI workflows to avoid
  mock.module() barrel export regression introduced in 1.3.11
- Remove test:ci script from package.json (use bun test directly)
- Update publish-workflow.test.ts to expect "bun test" instead

🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
2026-04-04 18:56:25 +09:00
YeonGyu-Kim eb4060d739 fix(test): narrow mock.module() targets in background-agent tests to prevent barrel corruption
Three test files were mocking the entire '../../shared' barrel, which
corrupted exports for subsequent test files in the same batch run.
Narrow mocks to specific submodules (logger, connected-providers-cache).

Also reverts Bun version pin since the root cause was mock scope, not Bun.
2026-04-04 16:56:39 +09:00
YeonGyu-Kim 99ae6d91d0 fix(ci): pin Bun to 1.3.10 to avoid mock.module() barrel export regression in 1.3.11
Bun 1.3.11 has a regression where mock.module() leaks across test files
in isolated batch execution, causing barrel re-exports to fail with
'Export named X not found' errors. Pin to 1.3.10 until upstream fix.
2026-04-04 16:51:23 +09:00
YeonGyu-Kim 72c8cb8d92 fix(ci): typecheck script tooling in CI workflow
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 16:12:30 +09:00
YeonGyu-Kim 2c081e1999 fix(ci): restore isolated Bun test execution for mock.module suites
Running Linux CI in one Bun process still leaks mock.module registrations across files, so the workflows now use a CI-specific test runner that isolates mock-heavy targets before executing the remaining suite together.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 15:51:54 +09:00
YeonGyu-Kim 57ec3a46ac fix(ci): use unquoted heredoc to allow env var expansion 2026-04-04 14:47:15 +09:00
YeonGyu-Kim 9b30817021 fix(ci): prevent shell injection in workflow expressions 2026-04-04 14:18:25 +09:00
YeonGyu-Kim 5946dba47d ci: run publish workflow tests via bun test 2026-04-04 01:51:48 +09:00
YeonGyu-Kim 53eeac3f31 fix(ci): simplify test runner to plain bun test by fixing mock.module() leakage
- Add afterAll(() => { mock.restore() }) to 52 test files missing cleanup
- Rewrite create-tool-guard-hooks.test.ts to use spyOn instead of barrel mock
- Fix skill-mcp-manager OAuth tests with missing mockTokens/mockLogin definitions
- Fix start-work hook: show worktree active block on resume with existing worktree_path
- Extract createWorktreeActiveBlock to worktree-block.ts to avoid circular import
- Replace 80-line isolated test runner CI config with single `bun test` command
2026-04-04 00:34:03 +09:00
YeonGyu-Kim 951bca5399 fix(ci): include nested test files in isolated test execution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:19:48 -07:00
YeonGyu-Kim fd281deba7 fix(tests): resolve 25 pre-publish test failures
- Add providerModelsCache/fetchAvailableModels mocks to 20 utils.test.ts
  tests that broke when createBuiltinAgents started reading the cache
- Isolate ALL src/plugin and src/features/background-agent test files in CI
  (mock.module pollution crosses between files in the same bun process)
- Mirror CI isolation changes in publish.yml

25 failures → 0 in CI (all mock-pollution tests run individually)
2026-03-31 18:12:57 +09:00
YeonGyu-Kim d2c576c510 fix: resolve 25 pre-publish blockers
- postinstall.mjs: fix alias package detection
- migrate-legacy-plugin-entry: dedupe + regression tests
- task_system: default consistency across runtime paths
- task() contract: consistent tool behavior
- runtime model selection, tool cap, stale-task cancellation
- recovery sanitization, context-limit gating
- Ralph semantic DONE hardening, Atlas fallback persistence
- native-skill description/content, skill path traversal guard
- publish workflow: platform awaited via reusable workflow job
- release: version edits reapplied before commit/tag
- JSONC plugin migration: top-level plugin key safety
- cold-cache: user fallback models skip disconnected providers
- docs/version/release framing updates

Verified: bun test (4599 pass), tsc --noEmit clean, bun run build clean
2026-03-28 15:24:18 +09:00
YeonGyu-Kim 3be26cb97f fix(#2732): enhance notification for failed/crashed subagent tasks
- completedTaskSummaries now includes status and error info
- notifyParentSession: noReply=false for failed tasks so parent reacts
- Batch notification distinguishes successful vs failed/cancelled tasks
- notification-template updated to show task errors
- task-poller: session-gone tests (85 new lines)
- CI: add Bun shim to PATH for legacy plugin migration tests
2026-03-27 15:48:07 +09:00
YeonGyu-Kim a1b4e97e74 Merge pull request #2856 from potb/fix/publish-version-commitback
fix(publish): restore version commit-back to dev after npm release
2026-03-27 12:30:34 +09:00
YeonGyu-Kim 1c9f4148d0 fix(publish-ci): sync mock-heavy test isolation with ci.yml
Apply the same mock.module() isolation fixes to publish.yml:
- Move shared and session-recovery mock-heavy tests to isolated section
- Use dynamic find + exclusion for remaining src/shared tests
- Include session-recovery tests in remaining batch

Ensures publish workflow has the same test config as main CI run.
2026-03-27 00:56:55 +09:00
YeonGyu-Kim 8dd0191ea5 fix(ci): isolate mock-heavy shared tests to prevent cross-file contamination
Move 4 src/shared tests that use mock.module() to the isolated test section:
- model-capabilities.test.ts (mocks ./connected-providers-cache)
- log-legacy-plugin-startup-warning.test.ts (mocks ./legacy-plugin-warning)
- model-error-classifier.test.ts
- opencode-message-dir.test.ts

Also isolate recover-tool-result-missing.test.ts (mocks ./storage).

Use find + exclusion pattern in remaining tests to dynamically build the
src/shared file list without the isolated mock-heavy files.

Fixes 6 Linux CI failures caused by bun's mock.module() cache pollution
when running in parallel.
2026-03-27 00:08:27 +09:00
Peïo Thibault fb837db90d fix(publish): restore version commit-back to dev after npm release 2026-03-26 12:44:27 +01:00
Ravi Tharuma 5043cc21ac fix(model-capabilities): harden canonical alias guardrails 2026-03-25 22:11:45 +01:00
Ravi Tharuma a15f6076bc feat(model-capabilities): add maintenance guardrails 2026-03-25 16:14:19 +01:00
YeonGyu-Kim f0b5835459 fix(publish): correct repo guard to oh-my-openagent (GitHub renamed repo) 2026-03-25 09:21:38 +09:00
YeonGyu-Kim e0de06851d fix(publish): align repo guard and test topology
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-25 01:17:42 +09:00
YeonGyu-Kim 9b8aca45f9 fix(release): set version when publishing oh-my-openagent
The publish step was updating name and optionalDependencies but not
version, causing npm to try publishing the base package.json version
(3.11.0) instead of the release version (3.12.0).

Error was: 'You cannot publish over the previously published versions: 3.11.0'
2026-03-18 02:15:15 +09:00
YeonGyu-Kim de40caf76d fix(release): add oh-my-openagent dual-publish to platform and main workflows
- publish-platform.yml: Build job now checks BOTH oh-my-opencode and
  oh-my-openagent before skipping. Build only skips when both are published.
  Added 'Publish oh-my-openagent-{platform}' step that renames package.json
  and publishes under the openagent name.

- publish.yml: Added 'Publish oh-my-openagent' step after opencode publish.
  Rewrites package name and optionalDependencies to oh-my-openagent variants,
  then publishes. Restores package.json after.

Previously, oh-my-openagent platform packages were never published because
the build skip check only looked at oh-my-opencode (which was already published),
causing the entire build to be skipped.
2026-03-18 01:45:02 +09:00
YeonGyu-Kim f31f50abec fix(release): revert package identity to oh-my-opencode
Keep installer, config detection, schema generation, and publish workflows aligned with the long-lived oh-my-opencode package so this release does not split across two npm names.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim 88568398ac fix: sync root package.json version before binary compile (#2407) 2026-03-12 01:06:30 +09:00
YeonGyu-Kim a7d8c1cdf4 feat: dual-publish platform binaries for oh-my-openagent
After publishing oh-my-opencode-{platform}, rename package.json and
publish oh-my-openagent-{platform} from the same build artifact.
Download/extract steps now run if either package needs publishing.
2026-03-09 02:56:01 +09:00
YeonGyu-Kim adaeaca8e9 fix: add NODE_AUTH_TOKEN to publish-main job for npm auth
The publish-main job relied on npm trusted publishing (OIDC) which
broke after the repo rename from oh-my-opencode to oh-my-openagent.
Adding explicit NODE_AUTH_TOKEN restores auth while --provenance
still uses OIDC for Sigstore attestation.

Fixes #2373
2026-03-08 03:36:52 +09:00
YeonGyu-Kim e2444031ff ci(publish): deploy both oh-my-opencode and oh-my-openagent simultaneously 2026-03-08 02:31:26 +09:00
YeonGyu-Kim 21c249e8c8 fix(ci): pre-download baseline compile targets to avoid Bun extraction failures
Bun's internal download of baseline compile targets from npm registry
consistently fails on Windows CI runners (ExtractionFailed error).
Pre-download the baseline binary via curl into Bun's cache directory
so the compile step finds it already cached and skips the download.

Also makes publish job resilient with if: always() so one failed
platform doesn't block publishing all other successful platforms.
2026-02-27 04:43:29 +09:00
YeonGyu-Kim 0749a8f138 fix(ci): make platform publish resilient to individual build failures
publish job now runs with if: always() && !cancelled(), and gates
each publish step on download.outcome == 'success'. One flaky target
(e.g. windows-x64-baseline) no longer blocks all other platforms.
2026-02-27 04:39:05 +09:00
YeonGyu-Kim cc5e9d1e9b fix(ci): add baseline CPU variant binaries for legacy hardware support
Closes #2121
2026-02-26 21:00:45 +09:00
YeonGyu-Kim 0d76874632 ci(publish): isolate executor.test.ts to prevent mock contamination 2026-02-22 02:53:38 +09:00
YeonGyu-Kim 30491d769b ci: isolate executor.test.ts to prevent mock contamination in batch runs 2026-02-22 02:46:54 +09:00
YeonGyu-Kim 58b924aabe ci: isolate recovery-hook.test.ts to prevent mock.module leakage
recovery-hook.test.ts uses mock.module() at top level which patches the
executor module in the shared bun module cache. When run in the same
batch as executor.test.ts, executeCompact becomes the mocked no-op version,
causing all lock management tests to fail.

Move it to the isolated step (each file gets its own bun process) and
enumerate the remaining anthropic-context-window-limit-recovery test files
explicitly to avoid including recovery-hook.test.ts in the batch.
2026-02-21 05:11:40 +09:00
YeonGyu-Kim 96ff1e00cc chore: upgrade claude-sonnet-4-5 to claude-sonnet-4-6 across codebase 2026-02-18 15:51:24 +09:00
YeonGyu-Kim 25f2003962 fix(ci): isolate session-manager tests to prevent flakiness
- Move src/tools/session-manager to isolated test section
- Prevents mock.module() pollution across parallel test runs
- Fixes 4 flaky storage tests that failed in CI
2026-02-17 00:03:10 +09:00
YeonGyu-Kim 6dc8b7b875 fix(ci): sync publish.yml test steps with ci.yml to prevent mock pollution 2026-02-15 13:37:25 +09:00
YeonGyu-Kim daf011c616 fix(ci): isolate loader.test.ts to prevent CWD deletion contamination
loader.test.ts creates and deletes temp directories via process.chdir()
which causes 'current working directory was deleted' errors for subsequent
tests running in the same process. Move it to isolated step and enumerate
remaining skill-loader test files individually.
2026-02-14 14:54:28 +09:00
YeonGyu-Kim c8bc267127 fix(ci): isolate all mock-heavy test files from remaining test step
formatter.test.ts, format-default.test.ts, sync-executor.test.ts, and
session-creator.test.ts use mock.module() which pollutes bun's module
cache. Previously they ran both in the isolated step AND again in the
remaining tests step (via src/cli and src/tools wildcards), causing
cross-file contamination failures.

Now the remaining tests step enumerates subdirectories explicitly,
excluding the 4 mock-heavy files that are already run in isolation.
2026-02-14 14:39:53 +09:00
YeonGyu-Kim c41b38990c ci: isolate mock-heavy tests to prevent cross-file module pollution
formatter.test.ts mocks format-default module, contaminating
format-default.test.ts. sync-executor.test.ts mocks session.create,
contaminating session-creator.test.ts. Run both in isolated processes.
2026-02-14 14:15:59 +09:00
YeonGyu-Kim 4f3371ce2c fix(publish): use generate-changelog.ts for contributor thanks
- Replace inline bash changelog with script/generate-changelog.ts
- Update /publish command with layered release notes structure
- Add preview step and clear enhanced summary guidelines
2026-02-13 14:07:39 +09:00
YeonGyu-Kim 82c71425a0 fix(ci): add web-flow to CLA allowlist
GitHub Web UI commits have web-flow as the author/committer,
causing CLA checks to fail even after the contributor signs.
Adding web-flow to the allowlist resolves this for all
contributors who edit files via the GitHub web interface.
2026-02-11 10:59:17 +09:00
YeonGyu-Kim 953b1f98c9 fix(ci): use regex variables for bash 5.2+ compatibility in changelog generation 2026-02-04 15:00:31 +09:00
YeonGyu-Kim 62c8a671ee fix(ci): add shell: bash to retry action for Windows compatibility 2026-02-01 19:58:23 +09:00
justsisyphus e8cdab8871 fix(ci): add retry logic for platform binary builds
- Use nick-fields/retry@v3 for Build binary step
- 5 minute timeout per attempt
- Max 5 attempts with 10s wait between retries
- Prevents infinite hang on Bun cross-compile network issues
2026-02-01 17:03:35 +09:00
justsisyphus c83150d9ea feat(ci): auto-generate structured release notes from conventional commits 2026-02-01 15:34:19 +09:00