Skip to content

[HC-012] Hard cutover runtime acceptance harness into case modules and normal-user probes #8143

@doublemover

Description

@doublemover

Hard cutover policy: runtime acceptance is a modular test harness with normal-user execution. No 21k-line harness file, no UAC-elevated probe execution, no caught probe launch failure downgraded into evidence.

Source facts already established:

  • scripts/objc3c_runtime_acceptance/core.py has 21,707 lines.
  • npm run test:fast passed 12 execution smoke fixtures, then failed runtime acceptance with OSError: [WinError 740] The requested operation requires elevation while launching dispatch_expectations_support_test.exe.
  • Runtime acceptance mixes command execution, artifact registry, report building, case definitions, surface publication, and probe compilation in one file.

Required harness tree:

  • scripts/objc3c_runtime_acceptance/cli.py: argument parsing and exit code mapping.
  • scripts/objc3c_runtime_acceptance/registry.py: case registry.
  • scripts/objc3c_runtime_acceptance/case_result.py: result model.
  • scripts/objc3c_runtime_acceptance/commands.py: subprocess execution.
  • scripts/objc3c_runtime_acceptance/artifacts.py: artifact registry.
  • scripts/objc3c_runtime_acceptance/reports.py: JSON and progress reports.
  • scripts/objc3c_runtime_acceptance/probes/
    • compile.py
    • link.py
    • manifest.py
    • windows_manifest.py
  • scripts/objc3c_runtime_acceptance/cases/
    • runtime_library.py
    • dispatch.py
    • object_model.py
    • class_graph.py
    • protocols.py
    • categories.py
    • storage.py
    • properties.py
    • arc.py
    • blocks.py
    • errors.py
    • concurrency.py
    • metaprogramming.py
    • interop.py
    • package_loading.py
    • claimability.py
    • performance.py
  • scripts/objc3c_runtime_acceptance/surfaces/
    • source_surface.py
    • runtime_surface.py
    • evidence_surface.py

Required work:

  • Split core.py into the tree above.
  • Build probe executables with normal-user manifests.
  • Store probes under unprivileged temp artifact directories.
  • Add PE manifest validation for Windows probes.
  • Treat any probe launch failure as a hard failing case.
  • Move surface builders out of case execution modules.
  • Make case modules declare required binaries, fixtures, probes, and artifacts.
  • Delete runtime shim case naming from acceptance outputs.

Maximum effort shared hoist pass:

  • Hoist subprocess execution to commands.py.
  • Hoist artifact path creation to artifacts.py.
  • Hoist C++ probe compilation to probes/compile.py.
  • Hoist report writing to reports.py.
  • Hoist source/evidence surface builders to surfaces/.

Acceptance criteria:

  • core.py is deleted or reduced to a module import trampoline removed in the same PR.
  • No runtime acceptance Python file exceeds 1,500 lines.
  • Runtime acceptance probes run under a normal Windows user account.
  • WinError 740 becomes a regression test.
  • Fast runtime acceptance passes without elevation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions