Skip to content

The repository builds, checks and releases a second package, @simlock/e2e, with option checking #1566

Closed

Description

@V3RON

Part of #1562.

Scope

The repository becomes a workspace with a second package, @simlock/e2e, under packages/e2e. After this PR a user's config that calls simlockDevices(options) type-checks and a bad option fails at config load with its name; the repository's checks cover the new package; and a release sets one version in both packages, builds and checks both tarballs, and publishes @simlock/e2e before simlock. The provider's acquire and release come with the next task.

If this goes wrong, a contributor notices pnpm build or pnpm check failing on a clean checkout, or the maintainer notices a release that tags one version and publishes two.

Technical spec

Commit d8fadd1.

Rows

  • Behaviours: B1, B10, B11, B12
  • Stored state: S1
  • Interfaces: I1, I4, I5, I6, I7 (the factory and its loadClient parameter; acquire and release reject with simlock: not implemented until the next task)
  • Existing code: X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X22, X25, X26, X27

Facts

# Fact Source
F1 The installed Turborepo is 2.11.10; fifteen package.json scripts call turbo run <task ids>. node -p "require('./node_modules/turbo/package.json').version" printed 2.11.10; grep -c "turbo run" package.json printed 15
F2 pnpm build runs turbo run build:daemon:run build:ui:run build:capture:run; typecheck runs two tsc commands, neither through turbo. package.json:41, package.json:63
F3 The root build config excludes tests by extending the check config. tsconfig.build.json:1-4
F4 Fallow's entry list is the entry array. .fallowrc.json:30
F5 The release workflow has a dry-run input that plans and builds and publishes nothing. .github/workflows/release.yml:52
F6 src/release-script.test.ts runs scripts/release.mjs in a temp folder holding a fake manifest named simlock. src/release-script.test.ts:21

Modules touched

Searches: rg -n "turbo run" package.json .github scripts, rg -n "simlock-\$VERSION" .github, rg -n "depcruise|oxlint" package.json lefthook.yml.

  • packages/e2e/ (new): package.json, tsconfig.json, tsconfig.build.json, README.md, src/index.ts (the options type and their checking, I1), src/provider.ts (I7), their tests, src/config.sample.ts
  • pnpm-workspace.yaml, pnpm-lock.yaml, turbo.json, package.json (scripts, lint paths), vitest.config.ts, .dependency-cruiser.mjs, .fallowrc.json, lefthook.yml
  • scripts/release.mjs, src/release-script.test.ts, src/release-pack.test.ts, .github/workflows/release.yml
  • src/lint-rules.test.ts (the new boundary rule's test)
  • docs/internal/ARCHITECTURE.md, docs/internal/agent-rules/toolchain.md (the build section names the new task ids and the package)

Rules in play

  • ADR 0077 §1 to §5: the layout, the scope, the import rule, the one-version release and the checks are built as written.
  • A half-published release (@simlock/e2e on npm, simlock not) is recovered by re-running the failed publish job: each publish step skips a package whose exact version is already on npm and publishes the rest (decided in delivery, pending the maintainer).
  • docs/internal/agent-rules/toolchain.md (build steps): its turbo paragraph is updated to the new task ids in this PR.
  • docs/internal/agent-rules/documentation.md rule 9: the provider's website page and its surface check are the next task's; this PR documents nothing a user can run yet.
  • docs/internal/agent-rules/architecture.md (boundaries): the new dependency-cruiser rule is the only boundary added.

Tests

The seams are simlockDevices in packages/e2e/src/index.ts, scripts/release.mjs run as a command, and the pack test; model them on src/release-script.test.ts and src/release-pack.test.ts.

  • B1: a user calls simlockDevices(options): every row of the parent's Examples table, one table test; defaults for ttlMs, queueMs, installConcurrency, extraApps when left out; a good call returns a provider named simlock.
  • B10: a contributor runs the checks: a test under packages/e2e/src runs in the unit project; a fixture import from packages/e2e into src/ and one back are reported by dependency-cruiser's config (rule test on the config, as the existing boundary rules are tested).
  • B11: the maintainer releases: bump 0.8.0 writes both manifests in a scratch folder that holds a root manifest and a packages/e2e one; the repository's own two manifests hold the same version (S1); the pack test finds simlock-<v>.tgz and simlock-e2e-<v>.tgz, the second with package/dist/index.js, package/dist/index.d.ts and no test file; the workflow's plan, tag, pack, publish and release steps are asserted from the workflow file's text (both names checked, the not-on-npm message, both manifests committed, @simlock/e2e published first, both tarballs attached). Each workflow assertion pins the whole condition or command of its step (the exact if: expression, the npm view exit-code test, the plan step's not-on-npm branch), so an inverted condition fails the test; the titles claim what the workflow file says, not that a release recovers (decided in delivery, pending the maintainer).
  • B12: a config passing simlockDevices(...) to mobile({ device }) type-checks: all options; only the four required ones.
  • B13: the maintainer re-runs a half-published release: the workflow file's publish step for each package checks npm view <name>@<version> and skips the publish when that version exists (asserted from the workflow file's text, both names) (decided in delivery, pending the maintainer).

Done when

  • pnpm install && pnpm build on a clean checkout builds dist/ and packages/e2e/dist/index.js.
  • pnpm check passes, and pnpm test:unit lists tests from packages/e2e/src.
  • node scripts/release.mjs bump 9.9.9 in a scratch copy changes version in both package.json and packages/e2e/package.json.
  • pnpm lint passes, and the boundary rule's test in src/lint-rules.test.ts reports an import from src/ into packages/e2e and one back.
  • pnpm fallow reports nothing for packages/e2e.
  • grep -n "is not on npm yet" .github/workflows/release.yml finds the plan step's message.

Out of scope

  • acquire, release, renewal and the website page: the next task.
  • Moving simlock out of the repository root.
  • Mutation testing and the module-manual hook for packages/.

Depends on

Written by an agent.

Activity

  1. added
    task:draftScope written; technical spec or its spec check missing.
    on Nov 15, 2026
  2. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:draftScope written; technical spec or its spec check missing.
    on Nov 15, 2026
  3. self-assigned this
    on Nov 15, 2026
  4. 17 remaining items

  5. github-actions commented on Nov 15, 2026

    @github-actions
    Contributor

    Back to task:draft: .agents/scripts/spec-lint.mjs found blocking lines. Fix them in the body, then set task:ready again.

    B 1566 Tests: line 5 names B13, which the parent does not give to #1566
    
  6. V3RON commented on Nov 15, 2026

    @V3RON
    ContributorAuthor

    Handoff

    Done: R3 is fixed in 8e292a4, and the fix-check verified it. #1568 passed every review check and is ready. The stack is synced up to #1572 at 570e9e6.

    Not done: the merge. The gate refused the stack a second time with not merged: CI not green on PR #1568: fail Fallow. Fallow's health gate fails on Function 'checkUrl' has a CRAP score of 31.6 (threshold: 30) in packages/e2e/src/options.ts, in CI run 43733601215. The same failure showed at dd8dc62. The linear strip added for the CodeQL alert made checkUrl more complex.

    Findings: none open in review.

    Blocked on: delivery's rule that a second red gate parks. The maintainer approves one fix run that splits the strip out of checkUrl, plus a fix-check. Then stack-sync and merge-pr.sh 1572 run again.

    Written by an agent.

  7. added
    task:blockedAgent stopped on a blocker in its handoff. Maintainer re-adds the label it came from.
    on Nov 15, 2026
  8. removed their assignment
    on Nov 15, 2026
  9. removed
    task:draftScope written; technical spec or its spec check missing.
    on Nov 15, 2026
  10. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:blockedAgent stopped on a blocker in its handoff. Maintainer re-adds the label it came from.
    on Nov 15, 2026
  11. self-assigned this
    on Nov 15, 2026
  12. added
    task:draftScope written; technical spec or its spec check missing.
    and removed
    task:readySpec checked. An agent may implement it once its Depends on allow.
    on Nov 15, 2026
  13. github-actions commented on Nov 15, 2026

    @github-actions
    Contributor

    Back to task:draft: .agents/scripts/spec-lint.mjs found blocking lines. Fix them in the body, then set task:ready again.

    B 1566 Tests: line 5 names B13, which the parent does not give to #1566
    
  14. added a commit that references this issue on Nov 15, 2026
    26569d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

task:draftScope written; technical spec or its spec check missing.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions