You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: npm workspaces, TypeScript, lint and test runner, with the first core ports - #3
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.
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.
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)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 jobschanges,static(lint, typecheck, build) andunit(tests), and extendsCI Requiredto wait for them.staticandunitrun 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.package.jsoncarries"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 carryif: ... head.repo.full_name == github.repository, so a fork pull request never reaches a RunsOn runner. For a fork they are skipped, andCI Requiredfails 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 gitandgitleaks dirwith.gitleaks.toml,actionlint,zizmor 1.30.1: all exit 0. The diff againstmainis 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