Skip to content

test(core): adapter import rules and lint fixtures - #7

Merged
omercnet merged 2 commits into
mainfrom
replay/04-lintfx
Nov 21, 2026
Merged

omercnet merged 2 commits into
mainfrom
replay/04-lintfx

Conversation

@omercnet

Copy link
Copy Markdown
Contributor

What changed

The adapter import rules test (adapter-imports.test.ts: adapter to adapter, adapter to apps, provider SDK imports) and the lint-fixture test that runs ESLint over the fixture files and expects exactly the named rule to fire. 8 files (the other 17 fixtures arrived in the scanner slice).

Stacked on #6 (which is stacked on #4). Auto-merge stays off until the base has merged and this branch has been rebased onto main and retargeted.

Why

Keeps the layering rules (core, adapters, apps) enforced by tests from the start.

How it was verified

npm ci --ignore-scripts, lint, typecheck, build, npm test (145 tests), npm run test:tools, gitleaks (git and dir), actionlint, zizmor: all exit 0. The diff against its base is exactly the 8 files of this slice.

The "real tree lints clean" test lints apps and packages; apps does not exist yet, so it now lints only the roots that exist (3 lines, mirrored in the private project).

Not here yet

More ports and the licence check (next slices).

Checklist

  • Tests added or updated, or not applicable
  • No secrets or credentials committed
  • Docs updated, or not applicable

@baz-reviewer

baz-reviewer Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Review this PR on Baz

Baz Summary

Strengthen adapter and package-layer enforcement by testing ESLint boundary rules across imports, dynamic loading, relative paths, and indirect code evaluation. Add fixture-driven checks that verify forbidden imports produce exactly the expected rule while permitted core, adapter, application, and composition-root usage remains clean.

Topics

TopicDetails
Adapter boundaries Expand adapter-imports.test.ts to validate adapter isolation, app and provider restrictions, server composition exceptions, dynamic imports, relative paths, indirect loaders, and clean real-tree linting across available roots.
Modified files (7)
  • packages/core/test/boundaries/adapter-imports.test.ts
  • packages/core/test/boundaries/fixtures/adapter-imports-adapter.ts.txt
  • packages/core/test/boundaries/fixtures/adapter-imports-apps.ts.txt
  • packages/core/test/boundaries/fixtures/composition-ok.ts.txt
  • packages/core/test/boundaries/fixtures/server-imports-adapter-factory.ts.txt
  • packages/core/test/boundaries/fixtures/server-imports-adapter-type.ts.txt
  • packages/core/test/boundaries/fixtures/web-imports-adapter.ts.txt
Latest Contributors(1)
UserCommitDate
omercnettest(core): cover ever...November 21, 2026
Lint fixtures Verify core lint fixtures report exactly one expected ESLint boundary violation, cover static/subpath/dynamic imports and environment access, and preserve allowed or clean cases.
Modified files (1)
  • packages/core/test/boundaries/lint-fixtures.test.ts
Latest Contributors(1)
UserCommitDate
omercnettest(core): adapter im...November 21, 2026


Merger  Activate to get a short verdict whether this PR is good to go or not

Skills  Activate Skill Maintainer to keep your skills up to date

Planner  This PR would have been improved with Baz Planner - Try it now

@omercnet
omercnet force-pushed the replay/04-lintfx branch 2 times, most recently from c7a5339 to 6a6e109 Compare November 21, 2026 10:14
Base automatically changed from replay/03-scan to main November 21, 2026 10:20
@omercnet
omercnet marked this pull request as ready for review November 21, 2026 10:31
@omercnet
omercnet enabled auto-merge (squash) November 21, 2026 10:31
@shuni-bot

shuni-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

🐕 Shuni Review

No new issues found.

🤖 Model: claude-opus-5.5 · Effort: medium


Review scope: Partial incremental re-review

Reviewed new changes (1)
  • packages/core/test/boundaries/adapter-imports.test.ts
Previously reviewed and unchanged: 7 files.

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-opus-5.5 · Effort: medium

@shuni-bot shuni-bot 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.

🐕 Shuni review: 1 inline finding. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

@shuni-bot shuni-bot 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.

🐕 Shuni review: no new findings. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

@omercnet
omercnet merged commit 430c6c8 into main Nov 21, 2026
11 checks passed
@omercnet
omercnet deleted the replay/04-lintfx branch November 21, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant