Skip to content

chore: scaffold Compass OSS monorepo — toolchain, workspace, compass.v1 pipeline, CI - #1

Merged
mattwilkinsonn merged 5 commits into
mainfrom
sea-1027-compass-scaffold--cook
Jun 28, 2026
Merged

chore: scaffold Compass OSS monorepo — toolchain, workspace, compass.v1 pipeline, CI#1
mattwilkinsonn merged 5 commits into
mainfrom
sea-1027-compass-scaffold--cook

Conversation

@mattwilkinsonn

@mattwilkinsonn mattwilkinsonn commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

proto/devenv/moon toolchain; cargo+bun workspace; the compass.v1 contract as a single buf codegen pipeline (Rust prost/tonic + TS connect-es, checked in and drift-gated); compass-proto crate (permissive) + compassd skeleton (AGPL) + generated TS client + a minimal SolidJS UI. CI foundation: hk pre-push, the compass-ci image, and a Woodpecker bootstrap pipeline; moon run :ci green.

Closes SEA-1027


Summary by cubic

Scaffolded the Compass OSS monorepo with the toolchain, workspace, the compass.v1 contract pipeline, and CI. Delivers typed clients (Rust/TS), an async daemon skeleton, and a minimal UI, with moon run :ci as the single local/CI gate. Addresses SEA-1027.

  • New Features

    • Single buf pipeline for compass.v1: generates Rust (prost/tonic) in crates/compass-proto and TS (connect-es) in packages/compass-client (@compass/client); schema lives under crates/compass-proto/proto (permissive license); code is checked in and drift‑gated; breaking-change gate against main.
    • compass-daemon scaffold (compassd) with an async entrypoint and startup logging; contract smoke tests prove generated client/server stubs exist.
    • Minimal SolidJS UI @compass/ui that renders the service name and uses @compass/client; includes a gRPC‑Web client helper via @connectrpc/connect-web.
    • Tooling and CI: proto pins bun, node, and moon; Rust now comes from fenix using rust-toolchain.toml in both the dev shell and CI image (with a C linker); devenv shell; moon workspace with :ci; hk pre-push gate; CI image + Woodpecker bootstrap pipeline. CI runs buf lint/breaking, Nextest with JUnit output, nix/shell/toml/yaml linters, and a tightened cargo-deny policy (AGPL allowed only for first‑party crates). JS task caches hash bun.lock to prevent stale builds.
  • Migration

    • Run direnv allow, then bun install.
    • Use moon run :ci locally; CI runs the same graph.
    • Edit only crates/compass-proto/proto/ for API changes; regenerate via buf and commit results. Never hand-edit generated code under crates/compass-proto/src/gen or packages/compass-client/src/gen.

Written for commit ffcb1be. Summary will update on new commits.

Review in cubic

…v1 pipeline, CI

proto/devenv/moon toolchain; cargo+bun workspace; the compass.v1 contract as a single buf codegen pipeline (Rust prost/tonic + TS connect-es, checked in and drift-gated); compass-proto crate (permissive) + compassd skeleton (AGPL) + generated TS client + a minimal SolidJS UI. CI foundation: hk pre-push, the compass-ci image, and a Woodpecker bootstrap pipeline; moon run :ci green.

Closes SEA-1027
@linear-code

linear-code Bot commented Jun 27, 2026

Copy link
Copy Markdown

SEA-1027

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Initial Compass monorepo scaffold adding the compass.v1 proto contract, Rust daemon and generated client crates, a SolidJS UI, shared toolchain and CI configuration, and repository documentation and licensing.

Changes

Compass Monorepo Initial Scaffold

Layer / File(s) Summary
compass.v1 contract and generation
proto/compass/v1/compass.proto, buf.yaml, buf.gen.yaml, proto/moon.yml
Defines the compass.v1 service and messages, configures Buf lint/breaking/codegen for Rust and TypeScript, and wires proto Moon tasks with drift detection.
compass-proto crate and contract tests
crates/compass-proto/Cargo.toml, crates/compass-proto/src/lib.rs, crates/compass-proto/moon.yml, crates/compass-proto/tests/contract.rs
Adds the Rust contract crate, exports API_VERSION, and verifies the generated Rust surface with smoke tests.
TypeScript client package
packages/compass-client/package.json, packages/compass-client/src/index.ts, packages/compass-client/tsconfig.json, packages/compass-client/moon.yml, packages/compass-client/src/index.test.ts
Adds the generated TypeScript client package, its typed entrypoint, and wiring tests.
compassd daemon and Rust workspace
crates/compass-daemon/Cargo.toml, crates/compass-daemon/src/main.rs, Cargo.toml, rust-toolchain.toml, rustfmt.toml, .config/nextest.toml, deny.toml, crates/compass-daemon/moon.yml
Adds the daemon binary and the Rust workspace/tooling configuration, including toolchain pinning, formatting, nextest, and deny policy.
SolidJS UI application
apps/ui/index.html, apps/ui/src/App.tsx, apps/ui/src/client.ts, apps/ui/src/index.tsx, apps/ui/vite.config.ts, apps/ui/tsconfig.json, apps/ui/tsconfig.test.json, apps/ui/package.json, apps/ui/moon.yml, apps/ui/src/client.test.ts
Adds the UI entrypoint, Solid render bootstrap, app component, gRPC-Web client adapter, package metadata, TypeScript/Vite config, Moon tasks, and tests.
Workspace tooling and CI
.gitignore, .moon/workspace.yml, .prototools, biome.json, package.json, ci/ci-toolchain.nix, devenv.nix, devenv.yaml, .envrc, ci/moon.yml, ci/woodpecker/ci.yml, ci/publish-ci-image.sh
Adds workspace metadata, pinned tool versions, lint/dev-shell configuration, the CI toolchain image, the Woodpecker pipeline, and the image publish script.
Repository docs and licensing
README.md, CONTRIBUTING.md, AGENTS.md, CODEOWNERS, LICENSE, LICENSE-APACHE, LICENSE-MIT, docs/architecture/build-and-ci.md
Adds the README, contribution and agent guidance, ownership rules, license files, and architecture documentation.

Sequence Diagram(s)

sequenceDiagram
  participant UI as SolidJS UI
  participant client as createDaemonClient
  participant transport as gRPC-Web transport
  participant daemon as compassd

  UI->>client: createDaemonClient(baseUrl)
  client->>transport: createGrpcWebTransport({ baseUrl })
  transport-->>client: Transport
  client-->>UI: CompassClient
  UI->>transport: getDaemonInfo()
  transport->>daemon: GetDaemonInfo request
  daemon-->>transport: GetDaemonInfoResponse { version, api_version }
  transport-->>UI: response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 A monorepo sprouts in spring,
With proto seeds and toolchain string.
The daemon hums, the UI sings,
And CI maps the moonlit things.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: scaffolding the Compass OSS monorepo with toolchain, workspace, contract pipeline, and CI.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the changeset: it covers the monorepo scaffold, contract pipeline, UI, daemon, and CI setup.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sea-1027-compass-scaffold--cook

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR scaffolds the Compass OSS monorepo: it wires up the proto/devenv/moon toolchain, a Cargo + Bun workspace, the compass.v1 contract as a single buf codegen pipeline (Rust prost/tonic + TS connect-es, checked in and drift-gated), a compassd daemon skeleton, a minimal SolidJS UI, and a CI foundation (hk pre-push, the compass-ci OCI image, and a Woodpecker bootstrap pipeline).

  • Contract pipeline: buf generates Rust stubs into crates/compass-proto/src/gen and TS stubs into packages/compass-client/src/gen; both are checked in and enforced by a gen + git diff drift gate in compass-proto:ci. The compass-proto:ci task correctly includes buf lint, buf breaking, drift, clippy, and nextest.
  • CI image: ci/publish-ci-image.sh strips GHCR_TOKEN before the nix build, scans the built OCI config for secret-shaped env values, and uses a 0600 authfile (with EXIT trap) for the push — a thorough defence-in-depth approach.
  • Pre-push hook (hk.pkl): The buf-lint and drift steps use glob patterns proto/**/*.proto that do not match the actual proto file location (crates/compass-proto/proto/…), so both steps are silently skipped on every proto change; only CI catches drift and lint failures, removing the fast-feedback local gate the hook is designed to provide.

Confidence Score: 4/5

Safe to merge with the hk.pkl glob fix applied; the broken pre-push globs are a local developer-experience regression, not a CI correctness issue.

The pre-push buf-lint and drift steps in hk.pkl silently skip on every proto change because the glob proto/**/*.proto does not match crates/compass-proto/proto/…. Developers editing the proto schema get no local gate; CI (compass-proto:ci) still catches it, so no broken code can land undetected — but the fast-feedback loop the hook exists to provide is absent for the most important class of change.

hk.pkl — the buf-lint and drift step globs need updating to crates/compass-proto/proto/**/*.proto

Important Files Changed

Filename Overview
hk.pkl Pre-push hook config with incorrect proto glob patterns — buf-lint and drift steps silently skip on every proto file change
ci/moon.yml Repo-wide CI gate tasks (fmt, deny, biome, nixfmt, shellcheck, shfmt, taplo, actionlint) correctly wired; no issues
crates/compass-proto/moon.yml compass-proto CI task correctly includes lint, breaking, drift, clippy, and test; drift approach (gen then git diff) is sound
ci/publish-ci-image.sh Thoughtful build script: strips GHCR_TOKEN before nix build, secret-shapes scan on OCI config, authfile at 0600 with EXIT trap; safe
deny.toml License/supply-chain fence correctly allows permissive licenses and scopes AGPL exceptions to first-party crates only
crates/compass-daemon/src/main.rs Scaffold entrypoint with structured logging and CLI skeleton; intentionally minimal pending transport implementation
buf.gen.yaml Single buf codegen pipeline for Rust (prost/tonic) and TS (connect-es); clean: true is safe with the -o temp-dir drift approach
ci/ci-toolchain.nix CI image toolchain assembled from pinned derivations matching .prototools; /bin/sh and /usr/bin/env symlinks correctly handled
packages/compass-client/src/index.ts Typed compass.v1 client wrapper over connect-es transport; clean API surface
Cargo.toml Workspace manifest with correct dependency declarations; license carve-out for compass-proto documented and enforced via deny.toml

Reviews (5): Last reviewed commit: "fix(toolchain): provide exact Rust via f..." | Re-trigger Greptile

Comment thread proto/moon.yml Outdated
Comment thread ci/woodpecker/ci.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.envrc:
- Around line 8-10: Add rust-toolchain.toml to the direnv watch list in .envrc
so toolchain pin changes re-enter automatically. Update the existing watch setup
near the current watch_file .prototools entry to include rust-toolchain.toml as
another watched input. Keep the change aligned with the devenv/proto install
behavior so edits to either pin file refresh the shell.

In `@apps/ui/moon.yml`:
- Around line 19-21: The dev task in moon.yml is missing the same prerequisites
as typecheck/build/test, so `moon run ui:dev` can start before dependencies or
generated clients are ready. Update the `dev` task definition to depend on
`install` and `proto:gen`, matching the gating used by the other UI tasks so the
`dev` path is reliable on a fresh checkout.

In `@apps/ui/src/App.tsx`:
- Around line 4-8: Trim the block comment in App by removing the
roadmap/planning language and the multi-paragraph explanation; keep only a
short, non-obvious rationale or delete it entirely. Update the comment near the
walking-skeleton rendering logic so it does not restate what the UI shows or
mention future phases like “M3 UI work,” and keep any remaining note brief and
focused on why this component exists.

In `@apps/ui/src/client.test.ts`:
- Around line 4-6: The createDaemonClient test is only checking that
getDaemonInfo exists, which duplicates coverage and does not verify the
UI-specific forwarding behavior. Update the test around createDaemonClient in
client.test.ts to assert that the caller-provided baseUrl is actually passed
into the transport factory or reflected in the created client, so it fails if
the URL is hard-coded or ignored. Use createDaemonClient and its transport
wiring as the symbols to target, and make this a regression test for the
URL-passing behavior.

In `@apps/ui/tsconfig.json`:
- Around line 2-14: The apps/ui tsconfig is currently applying Bun types to all
source code because it includes src, which leaks bun:test types into browser app
code. Split test-only typing out of this config by creating a separate test
tsconfig or narrower include for the Bun-based test files, and keep the main app
tsconfig focused on browser code only; use the existing tsconfig.json settings
and the client.test.ts entry point to guide the split.

In `@ci/ci-toolchain.nix`:
- Around line 85-106: The CI toolchain image is missing gate binaries that are
already available in the local devenv setup, so add the missing tools to the
paths list used by the CI image. Update the ci-toolchain setup to include
actionlint, nixfmt-rfc-style, shellcheck, shfmt, and taplo alongside the
existing moon/Rust/contract tools, so any moon run :ci task that invokes them
can succeed in Woodpecker as well.
- Around line 89-97: CI is using nixpkgs-provided Rust binaries instead of the
repo-pinned toolchain, so update the Rust setup in ci-toolchain.nix to source
the compiler, clippy, and rustfmt from the rust-toolchain.toml pinned version
rather than pkgs.rustc/pkgs.clippy/pkgs.rustfmt. Keep the existing cargo plugins
and sccache, but make sure moon run :ci resolves the same Rust version locally
and in CI by referencing the toolchain configuration used for the rest of the
repo.

In `@ci/moon.yml`:
- Around line 24-31: The Biome task inputs only track TypeScript files, so TSX
edits in the Solid UI components can be missed and the cached result reused
incorrectly. Update the biome task in moon config to include TSX file patterns
alongside the existing TypeScript and JSON inputs, keeping the task name and
command unchanged so `moon run :ci` invalidates properly when `.tsx` files
change.
- Around line 17-23: The deny gate cache key is missing Cargo manifest files, so
Moon can reuse stale `cargo deny check` results after workspace edits. Update
the `deny` task inputs in `moon.yml` to include the workspace Cargo manifests
alongside `deny.toml` and `Cargo.lock`, using the `deny` task definition as the
place to add `Cargo.toml` and any relevant workspace manifest paths.

In `@ci/woodpecker/ci.yml`:
- Around line 15-16: The ci step in the Woodpecker pipeline is using the latest
image tag without forcing a fresh pull, so it may reuse a cached runner image
instead of the newly published one. Update the ci job definition in
ci/woodpecker/ci.yml for the ghcr.io/sealedsecurity/compass-ci:latest image by
enabling image pulling on the ci step so the runner always fetches the newest
build produced by ci/publish-ci-image.sh.

In `@crates/compass-daemon/src/main.rs`:
- Around line 1-8: Trim the module-level docs in the compassd entry point so
they only give a brief, non-roadmap rationale for the file, and remove the
SEA-1025 milestone reference. Update the top-of-file doc comment in main.rs to
avoid restating obvious implementation details or planning metadata; keep it
short and focused on why this module exists, not what the daemon does or future
delivery phases.

In `@crates/compass-proto/src/lib.rs`:
- Around line 1-11: Trim the crate-level docs in the lib.rs docs block to keep
only the non-obvious contract and licensing rationale, and remove the
roadmap/planning reference to SEA-1025. Update the top-of-crate documentation so
it no longer restates what the crate contains in multiple paragraphs; keep the
concise why-focused summary tied to the generated gRPC contract and the
permissive licensing carve-out.

In `@deny.toml`:
- Around line 11-26: The global licenses allow list currently permits AGPL
everywhere, which bypasses the intended dependency fence. Remove "AGPL-3.0-only"
from the top-level allow list in deny.toml and instead add crate-specific
exceptions for the workspace-owned AGPL packages only, using the appropriate
cargo-deny per-crate/package override entries so third-party AGPL dependencies
remain blocked.

In `@proto/compass/v1/compass.proto`:
- Around line 1-12: Trim the top-of-file banner in compass.v1 so it only
describes the stable contract intent and versioning, and remove rollout/planning
details like M1, SEA-1024, “full surface,” and generated-client/breaking-gate
notes. Update the proto comment block near the file header to keep only the
non-obvious contract context that must live with compass.proto, and move any
roadmap or behavior-defining prose into external docs or PR context.

In `@proto/moon.yml`:
- Around line 52-61: The drift check in the moon task should not depend on the
gen task, because gen writes directly into tracked generated directories and can
leave the repo mutated if generation fails. Update the drift flow so it
generates into a temporary output location and compares that against the
checked-in trees, keeping moon run :ci read-only. Use the drift task and gen
task definitions as the main anchors when refactoring.
- Around line 62-67: The proto workspace ci task is missing the breaking-change
gate, so `moon run proto:ci` can succeed without validating wire compatibility.
Update the `ci` task in `moon.yml` to include the `breaking` task alongside the
existing `lint` and `drift` dependencies, using the `breaking` task definition
already present in the same file, so the repo readiness check covers proto
compatibility.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4078b052-beb7-4319-905d-421e62be8dd7

📥 Commits

Reviewing files that changed from the base of the PR and between 9ef612d and 2fe9d48.

⛔ Files ignored due to path filters (7)
  • Cargo.lock is excluded by !**/*.lock
  • bun.lock is excluded by !**/*.lock
  • crates/compass-proto/src/gen/compass/v1/compass.v1.rs is excluded by !**/gen/**
  • crates/compass-proto/src/gen/compass/v1/compass.v1.tonic.rs is excluded by !**/gen/**
  • devenv.lock is excluded by !**/*.lock
  • hk.pkl is excluded by !**/*.pkl
  • packages/compass-client/src/gen/compass/v1/compass_pb.ts is excluded by !**/gen/**
📒 Files selected for processing (50)
  • .config/nextest.toml
  • .envrc
  • .gitignore
  • .moon/workspace.yml
  • .prototools
  • AGENTS.md
  • CODEOWNERS
  • CONTRIBUTING.md
  • Cargo.toml
  • LICENSE
  • LICENSE-APACHE
  • LICENSE-MIT
  • README.md
  • apps/ui/index.html
  • apps/ui/moon.yml
  • apps/ui/package.json
  • apps/ui/src/App.tsx
  • apps/ui/src/client.test.ts
  • apps/ui/src/client.ts
  • apps/ui/src/index.tsx
  • apps/ui/tsconfig.json
  • apps/ui/vite.config.ts
  • biome.json
  • buf.gen.yaml
  • buf.yaml
  • ci/ci-toolchain.nix
  • ci/moon.yml
  • ci/publish-ci-image.sh
  • ci/woodpecker/ci.yml
  • crates/compass-daemon/Cargo.toml
  • crates/compass-daemon/moon.yml
  • crates/compass-daemon/src/main.rs
  • crates/compass-proto/Cargo.toml
  • crates/compass-proto/moon.yml
  • crates/compass-proto/src/lib.rs
  • crates/compass-proto/tests/contract.rs
  • deny.toml
  • devenv.nix
  • devenv.yaml
  • docs/architecture/build-and-ci.md
  • package.json
  • packages/compass-client/moon.yml
  • packages/compass-client/package.json
  • packages/compass-client/src/index.test.ts
  • packages/compass-client/src/index.ts
  • packages/compass-client/tsconfig.json
  • proto/compass/v1/compass.proto
  • proto/moon.yml
  • rust-toolchain.toml
  • rustfmt.toml

Comment thread .envrc
Comment thread apps/ui/moon.yml
Comment thread apps/ui/src/App.tsx Outdated
Comment thread apps/ui/src/client.test.ts
Comment thread apps/ui/tsconfig.json Outdated
Comment thread crates/compass-proto/src/lib.rs Outdated
Comment thread deny.toml
Comment thread proto/compass/v1/compass.proto Outdated
Comment thread proto/moon.yml Outdated
Comment thread proto/moon.yml Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 issues found across 57 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="ci/ci-toolchain.nix">

<violation number="1" location="ci/ci-toolchain.nix:92">
P2: CI currently uses nixpkgs Rust binaries instead of the repository-pinned Rust toolchain, so compiler and lint behavior can drift from local development. Use the same Rust version source as `rust-toolchain.toml` for CI parity.</violation>
</file>

<file name="apps/ui/src/client.test.ts">

<violation number="1" location="apps/ui/src/client.test.ts:4">
P3: This test only checks that a method exists; it should assert that `createDaemonClient()` actually uses the provided `baseUrl` so regressions in URL wiring are caught.</violation>
</file>

<file name="ci/woodpecker/ci.yml">

<violation number="1" location="ci/woodpecker/ci.yml:16">
P2: CI image is unpinned (`latest`), making builds non-reproducible and vulnerable to silent image drift. Pin to an immutable digest (or fixed version tag) for deterministic CI.</violation>
</file>

<file name="crates/compass-daemon/Cargo.toml">

<violation number="1" location="crates/compass-daemon/Cargo.toml:16">
P3: Unused `tokio` direct dependency adds avoidable compile surface and maintenance noise. Remove it until async runtime APIs are actually used.</violation>
</file>

<file name="ci/publish-ci-image.sh">

<violation number="1" location="ci/publish-ci-image.sh:85">
P1: `GHCR_TOKEN` is stripped for build/scan but not for the publish step. This can allow pushing an image built under a different environment than the one that was scanned.</violation>
</file>

<file name=".config/nextest.toml">

<violation number="1" location=".config/nextest.toml:11">
P2: `ci` profile JUnit config is never activated by checked-in test commands. This leaves report generation effectively dead, so CI flaky/timing ingestion won’t receive `junit.xml`.</violation>
</file>

<file name="packages/compass-client/package.json">

<violation number="1" location="packages/compass-client/package.json:8">
P2: The package entrypoint exports a `.ts` source file instead of built JS. Publish/export compiled output (and types) so non-TS runtimes can consume `@compass/client` reliably.</violation>
</file>

<file name="devenv.nix">

<violation number="1" location="devenv.nix:59">
P2: PATH order is reversed for workspace JS tooling in the dev shell. Appending `node_modules/.bin` allows host-global binaries to override repo-pinned versions, causing local/CI drift.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread deny.toml Outdated
Comment thread ci/publish-ci-image.sh
Comment thread proto/moon.yml Outdated
Comment thread ci/moon.yml
Comment thread ci/woodpecker/ci.yml
Comment thread AGENTS.md Outdated
Comment thread crates/compass-daemon/moon.yml Outdated
Comment thread crates/compass-daemon/Cargo.toml
Comment thread rust-toolchain.toml Outdated
Comment thread packages/compass-client/package.json Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fe9d48d34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ci/ci-toolchain.nix
Comment thread proto/moon.yml Outdated
Comment thread ci/moon.yml
Comment thread proto/moon.yml Outdated
Comment thread ci/woodpecker/ci.yml Outdated
Comment thread ci/ci-toolchain.nix Outdated
Comment thread proto/moon.yml Outdated
Comment thread ci/moon.yml
Comment thread crates/compass-daemon/moon.yml
Comment thread proto/compass/v1/compass.proto Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/compass-daemon/src/main.rs (1)

14-31: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

compassd exits immediately instead of serving the contract.

After the startup log and banner, main returns Ok(()), so there is no long-lived process bound to the local transport and no implementation for CompassService/GetDaemonInfo. As shipped, the binary is not actually a daemon yet.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/compass-daemon/src/main.rs` around lines 14 - 31, The main entrypoint
in main should not return immediately after logging startup; it needs to start
and await the daemon/runtime that serves the contract over the local transport.
Update the main function to wire up the CompassService implementation, ensure
CompassService/GetDaemonInfo is actually handled, and keep the process alive by
awaiting the server or event loop instead of ending with Ok(()).
♻️ Duplicate comments (1)
proto/moon.yml (1)

56-62: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

drift still rewrites the checked-in generated trees before validating them.

Because drift depends on gen, moon run proto:ci mutates /crates/compass-proto/src/gen and /packages/compass-client/src/gen before diffing them. If generation fails or is interrupted, the repo can still be left partially rewritten instead of keeping the gate read-only.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@proto/moon.yml` around lines 56 - 62, The drift target still invokes the gen
task first, so the CI check can modify the checked-in generated outputs before
validating them. Update the proto:ci flow around the drift and gen targets so
drift only compares existing files and does not run generation itself; keep
generation as a separate explicit step, and adjust the drift script to fail on
differences without mutating crates/compass-proto/src/gen or
packages/compass-client/src/gen.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/moon.yml`:
- Around line 66-69: The workflow-existence guard in the moon CI script is too
brittle because the combined ls check in the actionlint gate only succeeds when
both .github/workflows globs match, so actionlint may be skipped even if
workflows exist. Update the guard in the script that wraps actionlint to detect
workflow files more robustly by checking for any matching .yml or .yaml file
independently, then run actionlint whenever at least one workflow file is
present.

In `@proto/compass/v1/compass.proto`:
- Around line 1-4: Update the banner comment in compass.v1 to match the actual
proto surface: it should describe only the existing unary GetDaemonInfo RPC in
the CompassService, and remove any mention of a server-streaming event channel
until that RPC is actually defined. Keep the contract wording aligned with the
symbols in this file so the schema documentation reflects the current service
accurately.

In `@rust-toolchain.toml`:
- Around line 1-3: The Rust version is currently described as pinned in
rust-toolchain.toml, but CI still sources Rust from nixpkgs, so the workspace
and image can drift. Update the CI toolchain setup in ci/ci-toolchain.nix to use
the same Rust pin as rust-toolchain.toml, or if that split is intentional,
revise the comment so it no longer claims parity. Keep the change aligned with
the Rust toolchain selection logic rather than the individual version text.

---

Outside diff comments:
In `@crates/compass-daemon/src/main.rs`:
- Around line 14-31: The main entrypoint in main should not return immediately
after logging startup; it needs to start and await the daemon/runtime that
serves the contract over the local transport. Update the main function to wire
up the CompassService implementation, ensure CompassService/GetDaemonInfo is
actually handled, and keep the process alive by awaiting the server or event
loop instead of ending with Ok(()).

---

Duplicate comments:
In `@proto/moon.yml`:
- Around line 56-62: The drift target still invokes the gen task first, so the
CI check can modify the checked-in generated outputs before validating them.
Update the proto:ci flow around the drift and gen targets so drift only compares
existing files and does not run generation itself; keep generation as a separate
explicit step, and adjust the drift script to fail on differences without
mutating crates/compass-proto/src/gen or packages/compass-client/src/gen.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 18822ab8-d15c-49be-b345-f2b67358cba6

📥 Commits

Reviewing files that changed from the base of the PR and between 2fe9d48 and 0f069c1.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • packages/compass-client/src/gen/compass/v1/compass_pb.ts is excluded by !**/gen/**
📒 Files selected for processing (21)
  • .envrc
  • AGENTS.md
  • Cargo.toml
  • apps/ui/moon.yml
  • apps/ui/package.json
  • apps/ui/src/App.tsx
  • apps/ui/src/client.ts
  • apps/ui/tsconfig.json
  • apps/ui/tsconfig.test.json
  • ci/ci-toolchain.nix
  • ci/moon.yml
  • ci/woodpecker/ci.yml
  • crates/compass-daemon/moon.yml
  • crates/compass-daemon/src/main.rs
  • crates/compass-proto/src/lib.rs
  • deny.toml
  • packages/compass-client/package.json
  • packages/compass-client/src/index.ts
  • proto/compass/v1/compass.proto
  • proto/moon.yml
  • rust-toolchain.toml

Comment thread ci/moon.yml Outdated
Comment thread crates/compass-proto/proto/compass/v1/compass.proto
Comment thread rust-toolchain.toml Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 23 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="ci/moon.yml">

<violation number="1" location="ci/moon.yml:69">
P2: Workflow-existence check is incorrect and can silently skip actionlint. Use a matcher that succeeds when either extension exists.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread ci/moon.yml Outdated
Comment thread proto/moon.yml Outdated
Comment thread packages/compass-client/src/gen/compass/v1/compass_pb.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f069c106e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ci/ci-toolchain.nix Outdated
Comment thread README.md Outdated
Comment thread ci/woodpecker/ci.yml
Comment thread apps/ui/moon.yml Outdated
Comment thread crates/compass-proto/proto/compass/v1/compass.proto
…ent hygiene

Wire the buf breaking gate and nix/shell/toml/yaml lint tasks into moon :ci; add /bin/sh, coreutils, and those linters to the CI image; strip planning metadata from source comments (regenerating the TS client); make compassd async; scope the cargo-deny AGPL allowance to first-party crates via exceptions; plus cache-input, PATH, and typecheck-split fixes.
@mattwilkinsonn
mattwilkinsonn force-pushed the sea-1027-compass-scaffold--cook branch from 0f069c1 to 9b09844 Compare June 27, 2026 22:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b09844dff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread proto/moon.yml Outdated
Comment thread apps/ui/moon.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06dc972aab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ci/woodpecker/ci.yml
Comment thread devenv.nix
Comment thread ci/ci-toolchain.nix Outdated
PR review found the Rust half of `moon run :ci` broke on a clean machine: the dev shell never provided cargo/rustc (proto pins only bun/node/moon, and ~/.cargo/bin was never on PATH), and the CI image lacked a C linker. fenix now builds the exact rust-toolchain.toml toolchain for both the dev shell and the CI image; stdenv.cc supplies cc. rust-toolchain.toml is the single source of truth (or rustup on the no-nix path).
@mattwilkinsonn
mattwilkinsonn merged commit 8f88a4e into main Jun 28, 2026
4 checks passed
seal-agent added a commit that referenced this pull request Jul 30, 2026
Two review-loop test additions on the durable sink-ack handler (PR #43),
both defending an invariant the first-round suite left to inference:

- runnerhub/commit_frame_test.go: a hub UPDATE-arm test symmetric to the
  posted happy path. The ConversationUpdated dispatch arm was proven only at
  the comms layer + via the fake recorder, never through Hub.commitFrame
  itself; this asserts the arm forwards under the bound account with the key
  threaded and returns the UPDATE's own row id (m-99) — a mis-wire that
  returned the posted id or the wrong frame now fails here (verified red).
- runnerhub/auth_test.go: TestAccountTokenRejectedOnEveryRPCPath gains a
  commit_conversation_frame subtest, replacing two dead duplicate
  relay_comms_call slots (Go suffixed #1/#2, so they ran but covered
  nothing new). The new RPC's door-interceptor wiring is now asserted
  Unauthenticated for an account token, closing the door-coverage gap.

Refs SEA-1364

Co-Authored-By: seal <noreply@sealedsecurity.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant