Skip to content

feat(experimental): tier contract, boundary lint, private-package convention - #279

Merged
haonan3 merged 2 commits into
mainfrom
feat/experimental-contract
Jul 31, 2026
Merged

feat(experimental): tier contract, boundary lint, private-package convention#279
haonan3 merged 2 commits into
mainfrom
feat/experimental-contract

Conversation

@haonan3

@haonan3 haonan3 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Writes down the experimental-tier contract converged during the #210 review and makes the mechanical rules lint-enforced. Stacked on #210 — the diff collapses to the last commit once #210 merges.

  • experimental/README.md — the tier contract: official flows live in core; this tier is the incubation side of a two-way flow (mainstream packages graduate up, ill-fitting core paths move down; private experimental/private_*/ packages stay uncommitted). Package anatomy with mirror naming (models/ / reward/ / examples/ named after the core home their content graduates into, so promotion is a structural no-op), single locked-stack policy (no version-compat branches), additive-only requirements with the differentiable ⇒ same-process ⇒ same-stack corollary, owner + verification-table requirement.
  • scripts/check_experimental_boundaries.py (wired into pre-commit): core never imports experimental; experimental packages never import each other; recipe requirements.txt may not re-declare core dependencies.
  • .gitignore: experimental/private_*/; the tier is deliberately not packaged into the wheel, so private code cannot leak into a build.

Test Plan

  • python scripts/check_experimental_boundaries.py — ok on the clean tree.
  • Negative self-test: synthetic violations of all three rules (core→experimental import, cross-package import, transformers==4.45.2 re-pin) — all three reported, exit 1.
  • pre-commit run --all-files — green, including the new hook.

Compatibility / Risk

Docs + additive lint only; no runtime code paths change. The new hook fails closed on future violations by design.

AI-assisted; reviewed and directed by the maintainer.

…vention

Writes down the experimental-tier rules converged in the #210 review and
makes the mechanical ones lint-enforced:

- experimental/README.md — the contract: two-way flow with core (official
  flows live in core; mainstream packages graduate up, ill-fitting core
  paths move down), package anatomy with mirror naming (models/ reward/
  examples/ named after the core home content graduates into), locked
  single-stack policy, additive-only requirements with the
  differentiable⇒same-process⇒same-stack corollary, owner+verification
  table requirement.
- scripts/check_experimental_boundaries.py (pre-commit): core never
  imports experimental; packages never import each other; recipe
  requirements may not re-declare core dependencies (same-process
  colocation cannot version-isolate).
- experimental/private_*/ gitignored; the tier is not packaged into the
  wheel, so private code cannot leak into a build.
@haonan3
haonan3 force-pushed the feat/experimental-contract branch from ed98f2a to d701b06 Compare July 31, 2026 07:26
@github-actions github-actions Bot added the wip Draft / work in progress label Jul 31, 2026
@haonan3
haonan3 marked this pull request as ready for review July 31, 2026 08:07
@github-actions github-actions Bot added need review Ready and waiting for review and removed wip Draft / work in progress labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need review Ready and waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant