PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
Loading...
Searching...
No Matches
pineforge_hpo.window_plan Namespace Reference

Classes

class  WindowPlanError
 
class  WindowPlanIdentity
 

Functions

dict[str, Any] require_window_plan_block (Mapping[str, Any] manifest, Mapping[str, Any]|None provenance=None)
 
Path|None derive_window_plan_path (_EngineLayout engine_layout)
 
dict[str, Any]|None associate_window_plan (_EngineLayout engine_layout)
 
Path resolve_window_plan_path (str|os.PathLike[str]|None explicit_path, str|os.PathLike[str]|None engine_root, WindowPlanIdentity|Mapping[str, Any] recorded_block)
 
None verify_window_plan (WindowPlanIdentity|Mapping[str, Any] block, str|os.PathLike[str] path)
 

Detailed Description

Recorded identity and hash-only admission for the native planner companion.

This module never loads a library. The native consumer must independently verify
and load a private snapshot to close the pathname race, then check the planner
exports, ABI and frozen self-test. Association records bytes, not proof of co-build.

Function Documentation

◆ associate_window_plan()

dict[str, Any] | None pineforge_hpo.window_plan.associate_window_plan ( _EngineLayout  engine_layout)
Record a controlled build's optional sibling, without changing compile keys.

Definition at line 293 of file window_plan.py.

◆ derive_window_plan_path()

Path | None pineforge_hpo.window_plan.derive_window_plan_path ( _EngineLayout  engine_layout)
Derive only the sibling of archive candidate 1 or 2; never search.

Definition at line 217 of file window_plan.py.

◆ require_window_plan_block()

dict[str, Any] pineforge_hpo.window_plan.require_window_plan_block ( Mapping[str, Any]  manifest,
Mapping[str, Any] | None   provenance = None 
)
Admit selected metadata, including optional supplied provenance.

An explicit helper path cannot replace a missing expected identity. Ordinary
precompiled loading does not call this function; selected callers must do so.
This checks association metadata only, not plugin bytes or helper exports.

Definition at line 160 of file window_plan.py.

◆ resolve_window_plan_path()

Path pineforge_hpo.window_plan.resolve_window_plan_path ( str | os.PathLike[str] | None  explicit_path,
str | os.PathLike[str] | None  engine_root,
WindowPlanIdentity | Mapping[str, Any]  recorded_block 
)
Resolve a run-machine path; call :func:`verify_window_plan` before handoff.

Explicit paths take precedence with no fallback. Derivation uses only a
caller-supplied local engine root with matching compile content. The recorded
build_path is audit data and is never used for lookup.

Definition at line 328 of file window_plan.py.

◆ verify_window_plan()

None pineforge_hpo.window_plan.verify_window_plan ( WindowPlanIdentity | Mapping[str, Any]  block,
str | os.PathLike[str]  path 
)
Check only the helper file's SHA-256 against the recorded expected bytes.

This pathname-based hash check is not race-free loading. Lane 2's native
consumer must copy/hash an opened file into a private snapshot and load that
verified snapshot, then validate exports, ABI and the frozen self-test.

Definition at line 386 of file window_plan.py.