Skip to content

feat(core): database, markdown, user, auth and access ports with in-memory fakes - #9

Merged
omercnet merged 1 commit into
mainfrom
replay/05-ports
Nov 21, 2026
Merged

omercnet merged 1 commit into
mainfrom
replay/05-ports

Conversation

@omercnet

@omercnet omercnet commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The ports for the database, Markdown converter, user store, auth verifier and access store, with in-memory fakes, a shared database conformance suite, and contract tests for each port. 14 files.

Rebased onto main (the slices below it have merged); auto-merge is on.

Why

Core code depends only on these interfaces; the adapters that implement them come in later slices and must pass the same contract tests.

How it was verified

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

Visuals

Not applicable: library interfaces and tests, nothing to show.

Not here yet

The access decision and authoriser (next slice), and every adapter.

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

Define core ports for database access, Markdown conversion, authentication, users, roles, and access decisions, along with in-memory fakes and shared contract tests. Standardize adapter behavior through typed results, transaction and lifecycle contracts, and reusable conformance suites.

Topics

TopicDetails
Core service ports Define the interfaces that core flows use for persistence, authentication, user lifecycle, Markdown conversion, development roles, and access fact retrieval.
Modified files (6)
  • packages/core/src/ports/access-store.ts
  • packages/core/src/ports/auth-verifier.ts
  • packages/core/src/ports/database.ts
  • packages/core/src/ports/dev-role.ts
  • packages/core/src/ports/markdown-converter.ts
  • packages/core/src/ports/user-store.ts
Latest Contributors(1)
UserCommitDate
omercnetfeat(core): database, ...November 21, 2026
Fakes and contracts Provide deterministic in-memory implementations and shared contract tests to validate database, Markdown, authentication, user, and access port behavior before adapters arrive.
Modified files (8)
  • packages/core/src/testing/database-conformance.ts
  • packages/core/src/testing/fake-database.ts
  • packages/core/src/testing/fake-markdown-converter.ts
  • packages/core/src/testing/fake-user-store.ts
  • packages/core/test/auth/port-contract.test.ts
  • packages/core/test/auth/verify-result.test.ts
  • packages/core/test/database/fake-database.test.ts
  • packages/core/test/markdown-converter/markdown-converter.test.ts
Latest Contributors(1)
UserCommitDate
omercnetfeat(core): database, ...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

Base automatically changed from replay/04-lintfx to main November 21, 2026 10:39
@omercnet
omercnet marked this pull request as ready for review November 21, 2026 10:40
@omercnet
omercnet enabled auto-merge (squash) November 21, 2026 10:40
@omercnet
omercnet merged commit 155b205 into main Nov 21, 2026
10 checks passed
@omercnet
omercnet deleted the replay/05-ports branch November 21, 2026 10:42
@omercnet omercnet mentioned this pull request Nov 21, 2026
3 tasks done
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