Skip to content

[HC-018] Hard cutover source hygiene gate for fallback, shim, old-mode, and stale-claim removal #8149

@doublemover

Description

@doublemover

Hard cutover policy: the repository contains no active fallback dispatch behavior, shim execution path, old language mode, stale support claim, or milestone-as-behavior source text. A source hygiene gate enforces this policy on every validation run.

Current status after checkpoint f4b6e455d:

  • npm run objc3c -- lint runs the hard-cutover source hygiene gate.
  • python -m scripts.source_hygiene produces JSON/text reports under tmp/reports/source_hygiene/hard-cutover/ and currently reports source_hygiene_ok: true, active_findings: 0.
  • Gate tests live in tests/tooling/source_hygiene/test_hard_cutover_gate.py and currently pass (20 passed).
  • The gate now covers runtime strict-cutover patterns including ComputeDispatchResult, retired objc3_msgsend_i32, compatibility dispatch metadata, unresolved dispatch pseudo-success wording, fallback-only wording, deterministic runtime arithmetic claims, and existing old-mode/compatibility patterns.

Implemented gate tree:

  • scripts/source_hygiene/
    • __main__.py
    • patterns.py
    • roots.py
    • report.py
    • scanner.py
  • tests/tooling/source_hygiene/
    • test_hard_cutover_gate.py

Required forbidden active-surface patterns:

  • ComputeDispatchResult
  • runtime_shim
  • compatibility_mode
  • --objc3-compat-mode
  • OBJC3C_FRONTEND_COMPATIBILITY_MODE
  • Backward-compatible aliases
  • legacy spec redirects
  • migration-assist
  • deterministic fallback
  • deterministic arithmetic
  • fallback-only
  • compatibility shim
  • old mode
  • planned steady-state
  • monolithic src/main.cpp
  • unresolved dispatch pseudo-success wording
  • retired msgsend and compatibility dispatch symbol metadata
  • milestone-as-behavior phrases in public headers and compiler implementation files

Required scanned roots:

  • README.md
  • .github/
  • docs/
  • spec/
  • schemas/
  • native/objc3c/
  • scripts/
  • tests/
  • stdlib/
  • site/

Remaining work:

  • Keep expanding patterns as later hard-cutover issues remove additional retired surfaces.
  • Add schema-backed source-hygiene report validation if/when the report schema is introduced.
  • Close this only after HC-001 through HC-017 land and the gate remains zero-violation across the final branch state.

Acceptance criteria:

  • npm run objc3c -- lint runs the hard-cutover gate.
  • The gate reports zero violations after HC-001 through HC-017 land.
  • CI blocks every forbidden active-surface pattern above.
  • Gate tests cover all active patterns and required roots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions