Skip to content

Add built-in ChunkTrust AHS and gated RTC+AHS inference - #25

Merged
Cuzyoung merged 2 commits into
SII-LiuLab:mainfrom
hf618:codex/chunktrust-ahs-rtc
Oct 30, 2026
Merged

Cuzyoung merged 2 commits into
SII-LiuLab:mainfrom
hf618:codex/chunktrust-ahs-rtc

Conversation

@hf618

@hf618 hf618 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

ManiMux cannot currently consume ChunkTrust's denoising evidence to choose an execution horizon. This adds built-in chunktrust_ahs and chunktrust_ahs_rtc algorithms through the existing inference registry, presets and scheduling interfaces.

Both algorithms embed the unchanged PI-family numerical core from ChunkTrust a9fd574, with attribution, all 19 selector parameters, transactional posterior/RNG updates, and reproducible state snapshots. Only accepted plans advance the selector. History records the first successfully submitted target in each policy interval. RTC conditions on the full prediction, preserves the selected execution budget and crops actions/trace by actual consumption at handoff.

The runtime changes include opt-in command feedback, isolated preview/warmup calibration, strict live capability validation, trace preservation in both XPolicyLab client paths, and example recipes plus experiment-matrix support. Existing model submodule pins and default experiment methods are unchanged. No external ChunkTrust package is required.

Backend support and why this is a draft

  • chunktrust_ahs can use the optional fixed XPolicyLab trace fork 53ac927, launched as an external model service. The default submodule has no required trace output.
  • chunktrust_ahs_rtc has a complete runtime path but no verified RTC+trace backend is currently available. It requires combined raw-v output and explicit zero guidance on padded model dimensions, and refuses unsupported backends before hardware connection. Tests use clearly marked synthetic capabilities.
  • This preserves the PI AHS scoring and budget semantics while adapting execution to ManiMux's fixed policy grid and online delay estimator. It does not reproduce the source TOPP timing, offline delay calibration or matched-noise protocol.
  • No checkpoint inference, GPU, model service or hardware run has been performed. Full EdgeRuntime.run with devices remains unverified. Keep this draft until real-backend and station qualification are available.

Validation

All five public probes pass in the development environment and in a separate source snapshot with a fresh Python 3.11 environment installed using uv sync --locked --extra xpolicylab --group dev:

  • Configuration: 60 actual loader/preset/matrix cases. Original seven default matrix outputs are unchanged.
  • Core: 25 independent reference cases, all 19 parameter consumers, 23 recorded score-to-K replays, invalid inputs, JSON state replay and transactional/reset checks.
  • Runtime: seven groups covering AHS/RTC multi-round execution, early/late handoff, common suffix alignment, command-history ownership, rejected/stale responses, prefix mutation rejection and legacy behavior.
  • Lifecycle: seven groups covering both cold sampler branches, RESET identity, formal/preview isolation, rejected-response recovery, formal first-latency accounting, capability gates and dispatch failures.
  • Wire: three groups covering both clients, real XPolicyLab codec/RTC validation and Pi05 forwarding, nondefault beta, full trace and recovery of rejected provider responses.

New non-vendored Python files pass Ruff. Seven new runtime/feedback modules pass strict Mypy. Modified existing files introduce no Ruff diagnostics relative to the base revision. Frozen-core identity, packaged licenses and whitespace checks pass.

Commands, parameter consumers, support limits and external-service setup are documented in skills/manimux-inference/references/chunktrust.md and the user guide. Fixture data accounts for most added lines. All numerical, lifecycle and wire evidence is CPU-only.

hf618 and others added 2 commits October 30, 2026 00:40
Use the accepted model prediction and RTC source offset for AHS history values while retaining the successful-submission admission rule. Exclude interpolation targets and unexecuted suffixes without changing experiment recording.

Validate history, scores and selector state across control sampling phases, RTC suffix handoffs, preview isolation and bounded multi-chunk history.
@hf618

hf618 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Confirmed the history fix in eff2cab. This fix looks good to me. Thanks!

@Cuzyoung
Cuzyoung marked this pull request as ready for review October 30, 2026 06:34
@Cuzyoung
Cuzyoung merged commit 50eb683 into SII-LiuLab:main Oct 30, 2026
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.

2 participants