Skip to content

chore: npm workspaces, TypeScript, lint and test runner, with the first core ports - #3

Merged
omercnet merged 3 commits into
mainfrom
replay/01-tooling
Nov 21, 2026
Merged

omercnet merged 3 commits into
mainfrom
replay/01-tooling

Conversation

@omercnet

Copy link
Copy Markdown
Contributor

What changed

npm workspaces with TypeScript project references, ESLint (flat config), Vitest, and the first three core ports (clock, config, logger) with in-memory fakes and their test. 19 files from the private project, plus the changes this slice makes to files that already exist:

  • .github/workflows/ci.yml: adds the jobs changes, static (lint, typecheck, build) and unit (tests), and extends CI Required to wait for them. static and unit run on RunsOn (runs-on=<run_id>-<attempt>-<job>/runner=4cpu-linux-x64).
  • .github/zizmor.yml: requires every action to be pinned by commit hash.
  • CONTRIBUTING.md: two sentences on how pull requests from forks are checked.
  • Every package.json carries "license": "Apache-2.0".

Why

First code slice. Fork safety: the workflow uses only pull_request, read-only token, no secrets, persist-credentials: false, pinned actions, no event text in scripts. The heavy jobs carry if: ... head.repo.full_name == github.repository, so a fork pull request never reaches a RunsOn runner. For a fork they are skipped, and CI Required fails on a skipped job unless the change touches only docs, so a code change from a fork cannot be merged until a maintainer re-runs the reviewed commit from a branch in this repository.

How it was verified

Locally on this branch: npm ci --ignore-scripts, npm run lint, npm run typecheck, npm run build, npm test (5 tests), gitleaks git and gitleaks dir with .gitleaks.toml, actionlint, zizmor 1.30.1: all exit 0. The diff against main is exactly the 19 planned files plus the three files above. The first CI run on RunsOn is the real check of the runner label.

Not here yet

Later slices add the sleep checker, import-boundary tests, more ports, the licence check and the integration jobs.

Checklist

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

@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)
  • CONTRIBUTING.md
Previously reviewed and unchanged: 21 files.

🐕 Review complete — View session on Shuni Portal 🐾

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

@omercnet
omercnet enabled auto-merge (squash) November 21, 2026 09:48
@baz-reviewer

baz-reviewer Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Review this PR on Baz

Baz Summary

Establish a Node 26 npm workspace and TypeScript project-reference foundation with Vitest, ESLint boundary enforcement, and the initial provider-independent core ports for time, configuration, and structured logging. Secure pull-request validation with pinned GitHub Actions, fork-aware CI gating, restricted heavy runners, and maintainer guidance while adding deterministic fakes and unit coverage for the core contracts.

Topics

TopicDetails
Secure CI workflow Harden pull-request validation by pinning actions, separating inexpensive checks from repository-only heavy jobs, detecting documentation-only changes, preserving merge gates, and documenting the maintainer approval and fork-replay workflow.
Modified files (3)
  • .github/workflows/ci.yml
  • .github/zizmor.yml
  • CONTRIBUTING.md
Latest Contributors(1)
UserCommitDate
omercnetdocs: maintainers read...November 21, 2026
Workspace architecture Establish the Node 26 npm workspace, dependency lockfile, TypeScript project references, Vitest test projects, and ESLint rules that enforce core, adapter, application, server-only, environment, and dynamic-loading boundaries.
Modified files (8)
  • .nvmrc
  • eslint.config.js
  • mise.toml
  • package-lock.json
  • package.json
  • tsconfig.base.json
  • tsconfig.json
  • vitest.config.js
Latest Contributors(1)
UserCommitDate
omercnetchore: npm workspaces,...November 21, 2026
Core contracts and fakes Define provider-independent Clock, Config, and Logger contracts, expose the core package, and provide deterministic FakeClock, makeFakeConfig, and FakeLogger implementations with unit coverage for core behavior.
Modified files (11)
  • packages/core/package.json
  • packages/core/src/index.ts
  • packages/core/src/ports/clock.ts
  • packages/core/src/ports/config.ts
  • packages/core/src/ports/logger.ts
  • packages/core/src/testing/fake-clock.ts
  • packages/core/src/testing/fake-config.ts
  • packages/core/src/testing/fake-logger.ts
  • packages/core/test/config-clock-logger/fakes.test.ts
  • packages/core/tsconfig.json
  • packages/core/tsconfig.test.json
Latest Contributors(1)
UserCommitDate
omercnetchore: npm workspaces,...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 mentioned this pull request Nov 21, 2026
3 tasks done
Comment thread .github/workflows/ci.yml Resolved

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

@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 37e306a into main Nov 21, 2026
10 checks passed
@omercnet
omercnet deleted the replay/01-tooling branch November 21, 2026 10:00
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