Skip to content

feat(omo-native): add Wave 0 native adapter scaffold#5454

Draft
code-yeongyu wants to merge 6 commits into
devfrom
code-yeongyu/omo-native-wave0
Draft

feat(omo-native): add Wave 0 native adapter scaffold#5454
code-yeongyu wants to merge 6 commits into
devfrom
code-yeongyu/omo-native-wave0

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Wave 0 for the omo-native plan: this adds the native adapter package boundary and Senpi submodule wiring without implementing the later runtime bridge. The new package builds to a Pi-compatible default-exported extension factory, while the focused native seam test intentionally stays RED for Wave 1's real Senpi/pi type-layer import.

This PR is intentionally draft-only. Do not mark ready and do not merge until explicitly requested.

Changes

  • Adds packages/senpi as a git submodule pinned to 4ce93bcfbc7c681a709f2579f664b1bbf92fbc1b.
  • Adds private workspace package @oh-my-opencode/omo-native with build.mjs, strict tsconfig, Pi manifest entry, and default-exported extension factory stub.
  • Wires root build:native, root package typecheck coverage, and Bun test ignores for the new native/senpi trees.
  • Keeps Wave 0 install independent from submodule internals, so CI checkout without submodules can still install/build/typecheck.
  • Adds seam-boundary-audit.test.ts to block raw Senpi/pi imports outside src/senpi/**; its positive seam assertion is intentionally RED until Wave 1 replaces the local stub with a real Senpi/pi type-layer import.
  • Updates script/package-registration-audit.test.ts so packages/omo-native is recognized as a managed native package/typecheck target without requiring a root workspace:* devDependency.
  • Commits PR-facing QA evidence, including an actual rendered terminal/TUI screenshot.

Manual QA / Evidence

terminal TUI proof

  • bun install --frozen-lockfile --ignore-scripts: PASS, recorded in .omo/evidence/20260620-omo-native-wave-0/final-convention-fix-verification.txt.
  • node packages/omo-native/build.mjs: PASS.
  • bun run build:native: PASS, re-run after the package-registration CI fix in .omo/evidence/20260620-omo-native-wave-0/build-native-after-registration-fix.txt.
  • node -e "import('./packages/omo-native/dist/index.js').then(m => console.log(typeof m.default))": PASS, printed function.
  • bun run --cwd packages/omo-native typecheck: PASS, re-run after the package-registration CI fix in .omo/evidence/20260620-omo-native-wave-0/native-typecheck-after-registration-fix.txt.
  • bun test script/package-registration-audit.test.ts: PASS after ac93763dd, 5 pass, 0 fail, recorded in .omo/evidence/20260620-omo-native-wave-0/package-registration-audit-fix-verification.txt.
  • bun test: PASS after ac93763dd, 10072 pass, 2 skip, 0 fail, recorded in .omo/evidence/20260620-omo-native-wave-0/root-bun-test-after-package-registration-fix-summary.txt.
  • bun run --cwd packages/omo-native test: expected RED; exit 1 is only the planned positive seam assertion requiring a real Senpi/pi type-layer import in Wave 1. The boundary audit itself passes.
  • git diff --check and git diff --cached --check: PASS.
  • tmux cleanup receipt: no ulw-qa-omo-native-wave0-terminal or omo-native QA session remains.

CI Status

Current head: ac93763dd (test(omo-native): register native package audit).

  • GitHub CI is green on the current head after rerunning the previously cancelled Windows test.
  • Passing current-head checks include build, Ubuntu/macOS/Windows typecheck, Ubuntu/macOS/Windows tests, Ubuntu/macOS/Windows Codex compatibility, CLA, labels, lazycodex published smoke, and GitGuardian.
  • draft-release and auto-commit-schema are skipped by CI as draft/release-gated jobs, not failures.
  • Cubic bot: no Cubic review/comment is present on this draft PR at the time of this update.

CI Fix Evidence

  • First CI run failed during bun install because checkout does not initialize the new packages/senpi submodule and the initial lock/manifests linked file deps under packages/senpi/packages/*.
  • Fix removes install-time Senpi internals from Wave 0 while preserving the pinned submodule.
  • Pushed-branch repro: .omo/evidence/20260620-omo-native-wave-0/ci-nosubmodule-install-repro-pushed.txt cloned this branch at e59250899, removed packages/senpi, verified no install-time Senpi package links remain, then passed frozen install, native build, and native typecheck.
  • Second CI run failed root bun test because the package registration audit did not yet classify packages/omo-native as managed.
  • Fix commit ac93763dd adds nativePackagePaths to the audit and preserves the no-root-devDependency expectation for native packages. Local full-suite verification passed before push, and current-head GitHub CI is now green.

Evidence Files

  • Screenshot: .omo/evidence/20260620-omo-native-wave-0/terminal-tui.png
  • Screenshot receipt: .omo/evidence/20260620-omo-native-wave-0/terminal-tui-screenshot-receipt.txt
  • Transcript: .omo/evidence/20260620-omo-native-wave-0/terminal-tui-transcript.txt
  • Final verification: .omo/evidence/20260620-omo-native-wave-0/final-convention-fix-verification.txt
  • CI install fix: .omo/evidence/20260620-omo-native-wave-0/ci-install-fix-verification-v2.txt and .omo/evidence/20260620-omo-native-wave-0/ci-nosubmodule-install-repro-pushed.txt
  • Package-registration CI fix: .omo/evidence/20260620-omo-native-wave-0/package-registration-ci-fix-summary.md
  • Focused package audit: .omo/evidence/20260620-omo-native-wave-0/package-registration-audit-fix-verification.txt
  • Root suite after audit fix: .omo/evidence/20260620-omo-native-wave-0/root-bun-test-after-package-registration-fix-summary.txt
  • QA matrix: .omo/evidence/20260620-omo-native-wave-0/qa-matrix-final.md
  • Gate review: .omo/evidence/20260620-omo-native-wave-0/final-gate-review.md plus .omo/evidence/20260620-omo-native-wave-0/post-patch-gate-addendum.md

Known Intentional RED

The focused native test is not expected to go green in Wave 0. Its positive seam assertion is the guardrail that forces Wave 1 to replace src/senpi/types.ts with a real Senpi/pi type-layer import.

PR State

  • Draft PR only.
  • Not ready for review.
  • Not merged.

@code-yeongyu

Copy link
Copy Markdown
Owner Author

Wave 0 work report: implemented, pushed, and kept draft-only.

terminal TUI proof

Commits pushed:

  • aa8059a67 feat(omo-native): add native adapter scaffold
  • 8893585cd test(omo-native): add seam boundary audit
  • 71108d2ac test(omo-native): add wave 0 qa evidence

Manual QA actually run and recorded:

  • Frozen install: bun install --frozen-lockfile --ignore-scripts PASS.
  • Build: node packages/omo-native/build.mjs PASS and bun run build:native PASS.
  • Runtime import: dynamic import of packages/omo-native/dist/index.js printed function.
  • Typecheck: bun run --cwd packages/omo-native typecheck PASS.
  • Seam audit: bun run --cwd packages/omo-native test intentionally RED only for the future real Senpi/pi type-layer import check; no syntax/import setup failure.
  • Cleanup: generated dist removed and tmux session cleanup confirmed.

Evidence bundle in branch:

  • .omo/evidence/20260620-omo-native-wave-0/terminal-tui.png
  • .omo/evidence/20260620-omo-native-wave-0/terminal-tui-transcript.txt
  • .omo/evidence/20260620-omo-native-wave-0/terminal-tui-screenshot-receipt.txt
  • .omo/evidence/20260620-omo-native-wave-0/final-convention-fix-verification.txt
  • .omo/evidence/20260620-omo-native-wave-0/qa-matrix-final.md
  • .omo/evidence/20260620-omo-native-wave-0/final-gate-review.md
  • .omo/evidence/20260620-omo-native-wave-0/post-patch-gate-addendum.md

PR state remains: draft, not ready, not merged.

@github-actions github-actions Bot added the omo-native Changes under packages/omo-native label Jun 20, 2026
@code-yeongyu

Copy link
Copy Markdown
Owner Author

CI fix update after the first failed GitHub Actions run.

Root cause confirmed: GitHub Actions checkout does not initialize the new packages/senpi submodule, while the first Wave 0 scaffold made root bun install link file:packages/senpi/packages/{agent,ai}. That made every CI job fail during the install prerequisite with Failed to install 2 packages.

Fix pushed:

  • e59250899 removes the install-time dependency on Senpi internals while keeping the submodule pinned for Wave 1.
  • packages/omo-native still builds/typechecks from the local Wave 0 stub and still carries the intentional RED seam audit.

Fresh proof from the pushed branch:

  • .omo/evidence/20260620-omo-native-wave-0/ci-nosubmodule-install-repro-pushed.txt
  • Repro cloned code-yeongyu/omo-native-wave0 at e59250899, removed packages/senpi, confirmed no install-time Senpi package links remain, ran bun install --frozen-lockfile --ignore-scripts, node packages/omo-native/build.mjs, and bun run --cwd packages/omo-native typecheck successfully.

PR state remains draft-only, not ready, not merged.

@code-yeongyu

Copy link
Copy Markdown
Owner Author

CI fix update for Wave 0, keeping this PR draft-only.

terminal TUI proof

What changed in ac93763dd:

  • Reproduced the CI/root-suite failure: package-registration-audit.test.ts expected managed typecheck paths without packages/omo-native, while root typecheck:packages already included it.
  • Updated the audit to classify packages/omo-native as a managed native package.
  • Preserved the Wave 0 no-install-coupling rule by excluding native packages from the root workspace:* devDependency expectation.

Manual/local verification after the fix:

  • bun test script/package-registration-audit.test.ts: PASS (5 pass, 0 fail).
  • bun test: PASS (10072 pass, 2 skip, 0 fail).
  • bun run build:native: PASS.
  • bun run --cwd packages/omo-native typecheck: PASS.
  • Cleanup: no ulw-qa-omo-native-wave0-terminal or omo-native tmux QA session remained.

New PR-visible evidence:

  • .omo/evidence/20260620-omo-native-wave-0/package-registration-ci-fix-summary.md
  • .omo/evidence/20260620-omo-native-wave-0/package-registration-audit-fix-verification.txt
  • .omo/evidence/20260620-omo-native-wave-0/root-bun-test-after-package-registration-fix-summary.txt
  • .omo/evidence/20260620-omo-native-wave-0/build-native-after-registration-fix.txt
  • .omo/evidence/20260620-omo-native-wave-0/native-typecheck-after-registration-fix.txt

Pushed immediately after commit. New GitHub checks are running now; PR remains draft and not ready.

@code-yeongyu

Copy link
Copy Markdown
Owner Author

CI rerun status

Current head: ac93763dd (test(omo-native): register native package audit)

  • PR remains draft and open; no readiness/merge action taken.
  • Rerun for the previously cancelled Windows test is active: test (windows-latest) started at 2026-06-20T11:21:28Z on CI run 27868841125.
  • Current-head checks already green: build, Ubuntu/macOS/Windows typecheck, Ubuntu/macOS tests, Codex compatibility on Ubuntu/macOS/Windows, CLA, labels, GitGuardian.
  • Existing terminal-rendered TUI evidence remains attached here for reviewer convenience: terminal TUI

Next action: continue watching the rerun; if Windows produces a real failure log, I will fix only that failure, re-QA, commit, push, and update this draft PR again.

@code-yeongyu

Copy link
Copy Markdown
Owner Author

Final draft PR status update

Current head: ac93763dd (test(omo-native): register native package audit)

  • PR remains draft. I did not mark it ready, did not merge it, and did not enable auto-merge.
  • GitHub CI is green on the current head after rerunning the previously cancelled test (windows-latest) job.
  • Passing current-head checks: build; Ubuntu/macOS/Windows typecheck; Ubuntu/macOS/Windows tests; Ubuntu/macOS/Windows Codex compatibility; CLA; labels; lazycodex published smoke; GitGuardian.
  • Expected skipped jobs: draft-release and auto-commit-schema are draft/release-gated CI paths, not failures.
  • Cubic bot: no Cubic review/comment is present on this draft PR at the time of this update.
  • Manual QA evidence includes the terminal-rendered TUI screenshot below and the committed .omo/evidence/20260620-omo-native-wave-0/ evidence bundle.

terminal TUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

omo-native Changes under packages/omo-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant