Skip to content

feat: detection profiles, workspace roots and consumer runtime toolchain - #17

Merged
Cenadros merged 3 commits into
mainfrom
feat/runtime-toolchain
Sep 23, 2026
Merged

Cenadros merged 3 commits into
mainfrom
feat/runtime-toolchain

Conversation

@Cenadros

Copy link
Copy Markdown
Contributor

Summary

Combines subproject E (detection without noise) and subproject B (consumer toolchain and runtime targeting). Supersedes #16, whose commits are included here together with fixes from the final combined review.

Detection (E)

  • Drupal profile scans .module, .theme, .install, .inc, .profile and .engine as PHP (PHPCS, jscpd, anchors).
  • Source roots add workspace members from pnpm-workspace.yaml, package.json workspaces, depth-1 packages, composer.json autoload, [tool.uv.workspace] and setuptools where, through a bounded segment matcher.
  • Next and Payload profiles, detected per workspace owner: Next excludes build output only; Payload (config file or dependency) also excludes generated types, import map, admin route group, migrations and seed.
  • Knip gets static framework entries per workspace owner and plugin toggles generated from the full knip 6.35.1 registry (183 plugins), verified by a test.

Runtime (B)

  • Image ships corepack (pnpm 10.17.1 default, 11.5.2 and yarn 1.22.22 cached), uv 0.12.14, CPython 3.14.7 and /opt/venv314.
  • Python target from the root or uv workspace members selects /opt/venv314 at 3.14+, sets Ruff target-version, and joins the configuration hash when Python is resolved.
  • The version gate probes each tool through the environment its check uses.
  • doctor and versions gain a Runtime group.

Migration

POLICY_VERSION is now 2026-09-23.1: plugin toggles, Drupal extensions and profile scoping change findings. After upgrading, remove quality/ and run code-quality check --initialize. No Runroom repository has a .code-quality.yml yet.

Decisions

  • PHPStan phpVersion is not injected: PHPStan infers it from config.platform.php, and a lower Composer floor produces diagnostics the fail-closed adapter rejects.
  • doctor probes only corepack; the pnpm/yarn shims read packageManager from the analysed repository.
  • Known limits (documented): directories without a manifest inside a workspace container need paths.<language>; Payload exclusions scoped to a TS root also apply to other languages under it; the Knip node_modules guard checks the root only.

Verification

  • pnpm verify: typecheck, lint, 700 tests, build.
  • pnpm docker:build && pnpm integration: 26/26 rows (10 fixtures including drupal-project, payload-project, monorepo-project, python314-project; mutations including negative ones).
  • All fixture and repository baselines regenerated under the new policy; hashes match loadConfig.

…erated code

Reduce first-run noise on real repository layouts:

- Drupal profile scans .module, .theme, .install, .inc, .profile and .engine
  files as PHP in PHPCS and jscpd, with structural tree-sitter anchors.
- Source roots add workspace members from manifests (pnpm-workspace.yaml,
  package.json workspaces, depth-1 packages, composer autoload, uv workspace,
  setuptools where), unioned with conventional and discovered roots. Member
  patterns use a bounded segment matcher instead of picomatch.
- Payload/Next profile excludes generated types, import map, admin route
  group, migrations, seed data and Next build output, scoped to the resolved
  TypeScript roots, and reports a Notice.
- Knip receives static framework entry patterns per workspace owner, one
  workspace block per owner with its own ignore list, ignoreWorkspaces for
  members owning no source root, and plugin toggles generated from the
  complete knip 6.35.1 plugin registry (verified by a test).
- New fixtures drupal-project, payload-project and monorepo-project run in
  the integration suite, including a negative mutation for excluded code.

Adds smol-toml (runtime) and knip (dev) as exact dependencies.
- Image ships corepack (pnpm 10.17.1 default, pnpm 11.5.2 and yarn 1.22.22
  cached), uv 0.12.14, CPython 3.14.7 and a second tool venv /opt/venv314.
- Python target comes from the root or uv workspace members
  (.python-version, else the highest requires-python lower bound); targets
  at or above 3.14 run the Python tools from /opt/venv314, Ruff receives
  target-version, and the target is part of the configuration hash when
  Python is a resolved language.
- The version gate probes each tool through the environment its check uses.
- doctor and versions gain a Runtime group.
- Next and Payload profiles are split and detected per workspace owner;
  plain Next apps keep migrations and seed in scope.
- Workspace members map to <member>/src only when all sources live there.
- Knip entries cover the remaining Next file conventions.
- POLICY_VERSION 2026-09-23.1: Knip plugin toggles, Drupal extensions and
  profile scoping change findings, so every baseline is re-initialized.
@Cenadros
Cenadros requested a review from a team September 23, 2026 07:37
@Cenadros
Cenadros merged commit 2462522 into main Sep 23, 2026
8 checks passed
@Cenadros
Cenadros deleted the feat/runtime-toolchain branch September 23, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant