Skip to content

perf: delegate full gates to pull request CI - #476

Merged
pedronauck merged 3 commits into
mainfrom
gates-perf
Aug 25, 2026
Merged

pedronauck merged 3 commits into
mainfrom
gates-perf

Conversation

@pedronauck

@pedronauck pedronauck commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • delegate the mandatory full repository gate to draft pull-request CI and require green checks for the exact head SHA
  • keep local make gate scoped, evidence-cached, contention-bounded, and fail-safe for missing or unclassified paths
  • split and cache CI lanes, trim worktree bootstrap copies, and add a weekly uncached full-checkptr audit
  • accelerate migration-prefix fixtures through the production migration stepper while preserving every full-tail invariant

Measured decisions

  • migration-prefix construction now steps one production plan instead of rebuilding every prefix independently
  • a completed-database cache experiment was removed after full-package measurements showed no aggregate gain: 1322.7s cold versus 1363.5s repeat
  • standard race lanes disable checkptr only for modernc.org/...; the weekly workflow runs uncached with full checkptr

Verification

  • make gate — scoped local gate; evidence fingerprint recorded in .cache/gate/
  • gate integration suite — 21 passing race tests
  • Mage suite — 154 passing tests
  • cy-loop-tasks helper suite — 38 passing tests
  • Actionlint and repository formatting checks pass for changed workflows and task configuration

QA impact

No user-visible product behavior changed. This is developer gate, CI, test-fixture, and worktree tooling, so no docs/qa/scenarios/ entry is added or reset.

Compozy Impact Audit

  • Native tools: no impact; checked tool IDs, descriptors, schemas, digests, risk flags, and capability gates. No native-tool source or contract changed.
  • Extensibility and hooks: runtime extensions, hooks, registries, bridge SDKs, MCP sidecars, and config lifecycle are unchanged. The spec-cycle skill copies only adopt the same gate evidence contract.
  • Workspace data isolation: no runtime datum was added or re-scoped. Workspace IDs, CLI/HTTP/UDS paths, stores, SSE, caches, and events are unchanged; new caches are build/test-only.
  • Official Compozy skill: no impact after checking skills/compozy/; no public tool ID, CLI path, hook event, capability, extension resource, or memory/network/task behavior changed.

No config.toml key, default, or setting lifecycle changed.

Summary by CodeRabbit

  • Bug Fixes

    • Improved desktop startup and deep-link verification, including clearer handling of invalid pages.
    • Improved onboarding checks and native shortcut validation.
    • Improved reporting for interrupted prompt sessions and incomplete responses.
    • Increased reliability of database migrations and migration test setup.
  • Improvements

    • Updated Linux desktop packaging and automated end-to-end verification.
    • Improved test distribution and execution efficiency for faster, more consistent validation.
    • Enhanced gate checks with affected-area validation, capacity coordination, and more reliable evidence tracking.
    • Updated worktree guidance and behavior for active task materials.

@vercel

vercel Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
compozy-site Ready Ready Preview Aug 25, 2026 10:43pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c9641a3-6273-404c-b65c-413d47b2f04d

📥 Commits

Reviewing files that changed from the base of the PR and between 6e495a6 and 30bef3d.

⛔ Files ignored due to path filters (48)
  • .agents/skills/cy-final-verify/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/references/checklist.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/references/goal-header-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/references/phase-transitions.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/references/stacked-prs.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/references/state-schema.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/cy-loop-tasks/scripts/_state_io.py is excluded by !.agents/**
  • .agents/skills/cy-loop-tasks/scripts/detect-phase.py is excluded by !.agents/**
  • .agents/skills/cy-loop-tasks/scripts/init-state.py is excluded by !.agents/**
  • .agents/skills/cy-loop-tasks/scripts/test_scripts.py is excluded by !.agents/**
  • .agents/skills/cy-loop-tasks/scripts/update-state.py is excluded by !.agents/**
  • .agents/skills/cy-tasks-tail-qa-pair/references/qa-tail-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-code-guidelines/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-code-guidelines/references/concurrency-patterns.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-contract-codegen-coship/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-contract-codegen-coship/references/coship-checklist.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-real-scenario-qa/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-real-scenario-qa/scripts/audit-qa-evidence.py is excluded by !.agents/**
  • .agents/skills/eng/eng-schema-migration/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-test-conventions/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-test-conventions/references/test-shape-rules.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/eng/eng-test-conventions/scripts/check-test-conventions.py is excluded by !.agents/**
  • .agents/skills/eng/eng-worktree-isolation/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/git-rebase/scripts/analyze-conflicts.sh is excluded by !.agents/**
  • .agents/skills/git-rebase/scripts/validate-merge.sh is excluded by !.agents/**
  • .agents/skills/qa-execution/SKILL.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/qa-execution/assets/report-template.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/qa-execution/references/fix-loop.md is excluded by !**/*.md, !.agents/**
  • .agents/skills/qa-execution/references/status-and-reporting.md is excluded by !**/*.md, !.agents/**
  • .github/CONTRIBUTING.md is excluded by !**/*.md
  • .github/PULL_REQUEST_TEMPLATE.md is excluded by !**/*.md
  • .github/actions/setup-go/action.yml is excluded by !**/*.yml
  • .github/workflows/ci.yml is excluded by !**/*.yml
  • .github/workflows/go-checkptr.yml is excluded by !**/*.yml
  • .github/workflows/go-test-census.yml is excluded by !**/*.yml
  • .github/workflows/release.yml is excluded by !**/*.yml
  • .vscode/tasks.json is excluded by !**/*.json, !.vscode/**
  • CLAUDE.md is excluded by !**/*.md
  • README.md is excluded by !**/*.md
  • docs/_memory/_synthesis.md is excluded by !**/*.md
  • docs/_memory/glossary.md is excluded by !**/*.md
  • docs/_memory/standing_directives.md is excluded by !**/*.md
  • docs/release/v0.3-single-cut.md is excluded by !**/*.md
  • extensions/spec-cycle/skills/cy-final-verify/SKILL.md is excluded by !**/*.md
  • magefiles/gotest_census.json is excluded by !**/*.json
  • mise.toml is excluded by !**/*.toml
📒 Files selected for processing (26)
  • Makefile
  • desktop/e2e/_electron/__tests__/shell.spec.ts
  • desktop/e2e/_electron/helpers.ts
  • desktop/scripts/build-e2e-update.ts
  • desktop/scripts/run-e2e-linux.sh
  • extensions/spec-cycle/skills/git-rebase/scripts/analyze-conflicts.sh
  • extensions/spec-cycle/skills/git-rebase/scripts/validate-merge.sh
  • internal/cli/client_session_prompt.go
  • internal/cli/gateway_client_test.go
  • internal/store/globaldb/global_db_loop_test.go
  • internal/store/globaldb/global_db_migration_seed_test.go
  • internal/store/migrate.go
  • internal/store/migrate_test.go
  • internal/store/migration_stepper.go
  • magefiles/defaults.go
  • magefiles/gotest_census.go
  • magefiles/gotest_census_test.go
  • magefiles/gotest_census_update.go
  • magefiles/gotest_lane.go
  • magefiles/gotest_lane_test.go
  • magefiles/magefile_test.go
  • magefiles/test.go
  • scripts/gate.sh
  • scripts/gate_integration_test.go
  • scripts/gate_runtime.sh
  • scripts/worktree.sh

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

The pull request updates gate classification and evidence, weighted Go test sharding, migration stepping and seed caching, Linux desktop E2E execution, session-stream errors, and worktree synchronization.

Changes

Gate execution

Layer / File(s) Summary
Gate runtime and classification
scripts/gate.sh, scripts/gate_runtime.sh
The gate classifies affected paths, computes content fingerprints, and coordinates machine-capacity slots.
Gate lanes and evidence
scripts/gate.sh, Makefile, extensions/spec-cycle/skills/git-rebase/scripts/*
The gate runs affected local lanes, delegates full verification to CI, and validates fingerprinted evidence records.
Gate integration coverage
scripts/gate_integration_test.go
Integration tests cover merge-base failures, scoped lanes, evidence logs, classification, capacity waiting, and runtime fixtures.

Go test census and sharding

Layer / File(s) Summary
Census model and updates
magefiles/gotest_census.go, magefiles/gotest_census_update.go, magefiles/gotest_census_test.go, magefiles/defaults.go
Mage now stores duration census data, updates it from gotestsum events, and partitions weighted items deterministically.
Weighted shard execution
magefiles/gotest_lane.go, magefiles/test.go
Go tests use weighted package and split-test shards with safety arguments and separate SDK execution.
Census and shard tests
magefiles/gotest_lane_test.go
Tests cover census loading, weighted assignment, SDK policy, safety arguments, and package-list diagnostics.

Migration stepping and seed generation

Layer / File(s) Summary
Reusable migration stepping
internal/store/migration_stepper.go, internal/store/migrate.go, internal/store/migrate_test.go
Migration application now uses MigrationStepper and explicit version boundaries.
Cached migration seed snapshots
internal/store/globaldb/global_db_migration_seed_test.go
Seed generation adds versioned caching, locking, incremental migration application, validation, and atomic snapshots.
Embedded migration source inspection
internal/store/globaldb/global_db_loop_test.go
Migration source inspection now reads embedded files through io/fs.

Desktop E2E execution

Layer / File(s) Summary
Linux E2E runner and build targets
Makefile, desktop/scripts/run-e2e-linux.sh, desktop/scripts/build-e2e-update.ts
Linux E2E runs under Xvfb with Openbox, and Electron builds use explicit platform targets.
Desktop E2E state and assertions
desktop/e2e/_electron/helpers.ts, desktop/e2e/_electron/__tests__/shell.spec.ts
E2E tests verify onboarding completion and update workspace, clipboard, cold-start, and deep-link assertions.

Session prompt stream errors

Layer / File(s) Summary
Centralized stream error handling
internal/cli/client_session_prompt.go
Session prompt streams share error construction for decode, state, incomplete-stream, and gateway interruption errors.
Gateway interruption coverage
internal/cli/gateway_client_test.go
Gateway tests cover interrupted SSE prompt sessions and their error classifications.

Worktree synchronization

Layer / File(s) Summary
Active worktree content
scripts/worktree.sh, Makefile, magefiles/magefile_test.go
Worktrees copy selected agent state, documentation, active tasks, and prompts while excluding archived evidence.
Worktree completion guidance
scripts/worktree.sh
Completion guidance uses make gate-full and describes draft PR and CI ownership steps.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Gate as scripts/gate.sh
  participant Runtime as scripts/gate_runtime.sh
  participant Git as Git
  participant Lanes as Affected lanes
  Gate->>Git: classify changed content
  Gate->>Runtime: compute tree_fingerprint
  Gate->>Runtime: acquire_gate_slot
  Gate->>Lanes: run affected local lanes
  Lanes-->>Gate: lane results
  Gate->>Runtime: release_gate_slot
Loading
sequenceDiagram
  participant Apply as store.Apply
  participant Stepper as MigrationStepper
  participant Goose as Goose provider
  participant Database as SQL database
  Apply->>Stepper: NewMigrationStepper
  Stepper->>Goose: prepare migration provider
  Stepper->>Database: validate connection capacity
  Apply->>Stepper: UpTo maximum version
  Stepper->>Goose: apply pending migrations
  Goose->>Database: update migration state
Loading
✨ 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 gates-perf

Warning

Some tools did not complete. Review the errors below.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: build constraints exclude all Go files in /magefiles"
level=error msg="[linters_context] typechecking error: build constraints exclude all Go files in /scripts"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pedronauck
pedronauck marked this pull request as ready for review August 25, 2026 22:40
@pedronauck
pedronauck merged commit 6aae304 into main Aug 25, 2026
33 of 39 checks passed
@pedronauck
pedronauck deleted the gates-perf branch August 25, 2026 22:40
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR moves full verification responsibility into parallel pull-request CI while retaining scoped, evidence-cached local gates. It also adds weighted Go-test sharding, migration-prefix seed acceleration, desktop E2E isolation, and exact-head CI state to the task loop.

  • Splits CI into independently cached verification and E2E lanes.
  • Adds deterministic five-way Go test partitioning and weekly census/checkptr workflows.
  • Reuses a migration stepper and cached database snapshots for migration-prefix fixtures.
  • Adds PR URL, head SHA, and check metadata to Phase E delivery state.

Confidence Score: 4/5

The PR should not merge until Phase E verifies the recorded pull requests and required checks rather than trusting caller-supplied evidence.

The new completion state can be reached with arbitrary check labels and a local HEAD SHA, so it does not enforce the exact-head green-CI condition that now replaces the local full gate.

Files Needing Attention: .agents/skills/cy-loop-tasks/scripts/update-state.py, .agents/skills/cy-loop-tasks/scripts/detect-phase.py

Important Files Changed

Filename Overview
.agents/skills/cy-loop-tasks/scripts/update-state.py Adds delivery evidence persistence, but permits unauthenticated caller-supplied metadata to mark CI complete.
.agents/skills/cy-loop-tasks/scripts/detect-phase.py Adds an await-CI phase and trusts persisted delivery evidence when transitioning to done.
.github/workflows/ci.yml Parallelizes full verification and E2E lanes with aggregate checks and expanded Go sharding.
scripts/gate.sh Converts the local gate to fail-safe affected-lane verification while delegating full coverage to PR CI.
magefiles/gotest_lane.go Implements deterministic weighted package and split-test sharding with timing artifacts.
internal/store/migration_stepper.go Introduces a reusable validated migration provider for explicit version stepping.
internal/store/globaldb/global_db_migration_seed_test.go Builds migration-prefix fixtures incrementally and caches integrity-checked snapshots.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Local[Scoped make gate] --> Push[Push exact head]
  Push --> PR[Draft pull request]
  PR --> CI[Parallel full CI lanes]
  CI --> Observe[Observe required checks]
  Observe --> State[Record PR URLs, heads, and checks]
  State --> Done{Delivery PASS?}
  Done -->|Yes| Complete[Phase E done]
  Done -->|No| Repair[Repair and push new head]
  Repair --> CI
Loading

Reviews (1): Last reviewed commit: "perf: improve ci" | Re-trigger Greptile

Comment on lines +175 to +181
"CI evidence requires one --head-sha for every --pr-url"
)
invalid_url = next((url for url in pr_urls if not _GITHUB_PR_URL.fullmatch(url)), None)
if invalid_url:
raise StateUpdateError(f"invalid GitHub PR URL: {invalid_url}")
invalid_sha = next((sha for sha in head_shas if not _GIT_SHA.fullmatch(sha)), None)
if invalid_sha:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Caller-supplied CI pass state

When an agent supplies the current local HEAD, any syntactically valid PR URL, and any nonempty check name, this validation records PASS without confirming that the PR has that head or that its required checks succeeded, causing detect-phase.py to emit phase=E action=done while CI is pending or failing.

This branch was successfully deployed

1 active deployment
Preview — 30bef3dc Deployed Aug 25, 2026 by vercel[bot]
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