SRE-1010: Move Brunch architecture checks out of core unit tests - #9625
SRE-1010: Move Brunch architecture checks out of core unit tests#9625lunelson wants to merge 13 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Separately, Petrinaut’s voice tool-output path gets Reviewed by Cursor Bugbot for commit 6437e57. Bugbot is set up for automated code reviews on this repo. Configure here. |
TimDiekmann
left a comment
There was a problem hiding this comment.
Could you add a description and a title to the PR please?
There was a problem hiding this comment.
🟡 Changes recommended
Critical test skipping and an incomplete CI dependency guard must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Moves Brunch architecture checks into a dedicated test workspace while retaining app-specific checks locally.
Changes:
- Adds
@tests/brunch-agent-architecture. - Narrows app/core test inputs and prune exceptions.
- Relocates architecture helpers and regression tests.
- Contains unresolved critical and moderate CI coverage issues.
File summaries
| File | Description |
|---|---|
yarn.lock |
Registers the new test workspace. |
tests/brunch-agent-architecture/turbo.json |
Configures checker tasks; its dependency-completeness guard misses undeclared workspaces in affected CI. |
tests/brunch-agent-architecture/tsconfig.json |
Configures TypeScript checking. |
tests/brunch-agent-architecture/test/architecture.test.ts |
Hosts family-wide architecture assertions. |
tests/brunch-agent-architecture/test/architecture-workspace.ts |
Provides workspace introspection helpers. |
tests/brunch-agent-architecture/test/architecture-workspace.test.ts |
Tests file partitioning. |
tests/brunch-agent-architecture/package.json |
Defines the architecture-test workspace. |
tests/brunch-agent-architecture/docs/task-dependencies.json |
Records task dependencies. |
tests/brunch-agent-architecture/.oxlintrc.json |
Configures Oxlint. |
libs/@hashintel/brunch-agent/packages/core/turbo.json |
Narrows core test inputs. |
libs/@hashintel/brunch-agent/MISSION.md |
Documents architecture-check ownership. |
apps/brunch-agent/turbo.json |
Restricts app test inputs. |
apps/brunch-agent/test/architecture/workspace.test.ts |
Removes former combined helper tests. |
apps/brunch-agent/test/architecture/boundaries.test.ts |
Removes the former suite entry point. |
apps/brunch-agent/test/architecture/app-workspace.ts |
Adds app-local scanning helpers. |
apps/brunch-agent/test/architecture/app-workspace.test.ts |
Tests agent-module detection. |
apps/brunch-agent/test/architecture/app-boundaries.test.ts |
Retains app-specific registration checks. |
apps/brunch-agent/docs/task-dependencies.json |
Updates documented task dependencies. |
.github/actions/prune-repository/prune.py |
Narrows prune exceptions, but causes the core Linear graph suite to be skipped. |
.github/actions/prune-repository/prune_test.py |
Updates prune behavior tests. |
Review details
- Files reviewed: 19/20 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9625 +/- ##
=======================================
Coverage 65.89% 65.89%
=======================================
Files 1887 1887
Lines 198443 198443
Branches 8248 8248
=======================================
Hits 130773 130773
Misses 66140 66140
Partials 1530 1530 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 32cb88c. Configure here.
Merging this PR will not alter performance
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
as_constant |
< 1 ns | < 1 ns | N/A | |
constant_equal |
< 1 ns | < 1 ns | N/A | |
constant_not_equal |
< 1 ns | < 1 ns | N/A | |
access |
< 1 ns | < 1 ns | N/A | |
runtime_equal |
< 1 ns | < 1 ns | N/A | |
runtime_not_equal |
< 1 ns | < 1 ns | N/A |
Comparing ln/sre-1010-move-brunch-checks (6437e57) with main (94dff8e)1
Footnotes
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Stack generated by Git Town
🌟 What is the purpose of this PR?
Remove Brunch architecture source walkers from unit tests and put each surviving contract at its native enforcement point. Authored import boundaries remain in package-local Oxlint configuration, manifest boundaries remain in Yarn constraints, and behavioral tests prove emitted behavior.
This removes the reverse
libs → appstask relationship introduced by the SRE-1007 hotfix without replacing it with another cross-workspace scanner. Core and app unit-test tasks now own only files and behavior inside their packages.🔗 Related links
🚫 Blocked by
None.
🔍 What does this change?
ChatAgent.agentNamedirectly instead of rediscovering agents with a filesystem regex.🏗️ Agent notes
Inductive diagnosis
The review comments were a sample of one larger defect pattern: static policy had accumulated as filesystem-scanning unit tests. Those tests duplicated source code, package manifests, linter rules, file layout, and review decisions, then required custom ignore behavior and cross-workspace task inputs to remain runnable.
The rework applies one ownership rule:
Mission contract
Imperative. Remove static-policy source walkers from Brunch unit tests and let existing enforcement mechanisms own the contracts they can actually prove.
Proof.
Constraints.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
turbo.json's have been updated to reflect thisNone known.
🐾 Next steps
The reviewer identified similar pre-existing tautological assertions in core naming and authored-skill tests. They are non-blocking for SRE-1010 and are intentionally left for a separate product-test cleanup.
🛡 What tests cover this?
@hashintel/brunch-agent: 10 files and 94 tests; build, lint, and typecheck pass.@apps/brunch-agent: 23 files and 166 tests; build, lint, and typecheck pass.❓ How to test this?
yarn install --immutable && yarn constraints.yarn workspace @hashintel/brunch-agent build,lint:tsc,lint:eslint, andtest:unit.yarn workspace @apps/brunch-agent build,lint:tsc,lint:eslint, andtest:unit.python3 .github/actions/prune-repository/prune_test.py.yarn exec turbo run test:unit --filter @hashintel/brunch-agent --dry=jsonand confirm no app, sibling-package, or context-root Brunch inputs.📹 Demo
Not applicable — this changes static-policy ownership and CI task selection only.