fava-trails icon indicating copy to clipboard operation
fava-trails copied to clipboard

ops: run unreleased FAVA with local Laya on this Mac

Open timeleft-- opened this issue 2 months ago • 3 comments

Parent

https://github.com/MachineWisdomAI/fava-trails/issues/129

What to build

Install the implementation from ticket #131 on the operator's machine before it is released. Use the existing vendored runtime selector to activate the exact reviewed implementation commit, follow Unsloth's documented Decision API setup, select Typed decisions, and configure FAVA Trails to use the local service explicitly.

This is an operator-selected configuration change. Do not add localhost probing, runtime discovery, automatic backend selection, or provider fallback.

Acceptance criteria

  • [ ] The exact reviewed implementation commit is staged under the existing vendored FAVA runtime layout and selected through the machine's current runtime selector.
  • [ ] The active runtime reports the expected unreleased commit and module path through the existing FAVA version command.
  • [ ] Unsloth's Decision API is serving the Typed decisions model on its documented local endpoint.
  • [ ] Machine-local FAVA configuration selects the decisions policy, provider openai, model laya-typed-decisions, the loopback Unsloth API base, the existing credential boundary, and the required timeout.
  • [ ] The MCP client is restarted and loads the newly selected runtime.
  • [ ] One direct Trust Gate promotion reaches local /v1/systemone, records local-model provenance, and does not contact OpenRouter.
  • [ ] Existing runtime selection and configuration are retained so rollback remains possible.

Blocked by

  • https://github.com/MachineWisdomAI/fava-trails/issues/131

timeleft-- avatar Sep 29 '26 17:09 timeleft--

Local FAVA + Laya installation status

The machine-local installation work is complete, but this ticket is not closed because the production-shaped promotion acceptance cannot pass with Laya's current context limit.

Installed state

  • Reviewed FAVA merge commit: 6678c4d788044e73ac7df1c9e9c032741ec052c2 (merged PR #135).
  • Immutable runtime: a separate checkout pinned at that exact detached HEAD.
  • The existing runtime selector points to that immutable checkout.
  • Active module: FAVA 0.7.0 from the selected runtime's src/fava_trails/__init__.py; MCP SDK 2.2.0.
  • Unsloth 2026.9.12 installed separately for this FAVA trial.
  • A dedicated persistent Unsloth service runs over loopback.
  • Model settings: Decision API enabled, laya-typed-decisions, CPU.
  • FAVA machine configuration: decisions, provider openai, model laya-typed-decisions, the configured loopback API base, owner-only credential file, 240-second timeout.
  • Doctor classifies the destination as local /v1/systemone, confirms the credential file is available, and reports no silent cloud fallback.
  • Direct small-state Decision API request succeeded and returned a Noul probability from laya-typed-decisions.
  • The previous runtime selection and configuration are retained privately with owner-only permissions for rollback.
  • Other model services were not modified.

Remaining acceptance blocker

Stale MCP server processes using the prior runtime were terminated so clients can reconnect through the selector. A real production-shaped Trust Gate promotion still fails closed at local /v1/systemone: Unsloth returns HTTP 422 because the full scope-resolved prompt, candidate, metadata, and Noul question exceed the 1024-token context of laya-typed-decisions.

The same failure occurred for all 53 existing corpus cases, including the smallest boundary cases. Therefore the ticket's required successful promotion and durable local-model provenance do not yet exist. No OpenRouter fallback occurred. Ticket #133 contains the aggregate replay result.

No local prompt truncation or payload-reduction behavior was added because that would change the agreed Trust Gate contract and expand this ops ticket into a new product decision.

timeleft-- avatar Sep 29 '26 21:09 timeleft--

Fresh MCP-client acceptance used the selected runtime successfully:

  • Handshake: fava-trails 0.7.0, protocol 2025-11-25.
  • A real draft was saved through the restarted client.
  • propose_truth reached the configured local /v1/systemone endpoint with provider openai and model laya-typed-decisions.
  • The gate returned error on HTTP 422 at threshold 0.45 and failed closed.
  • Durable attempt provenance records the local destination and model; cloud_fallback is false.

This verifies the client restart, selected runtime, local routing, and no-OpenRouter behavior. It does not satisfy the required successful promotion: the thought remains outside governed recall because Laya rejected the full state for exceeding its context window.

timeleft-- avatar Sep 29 '26 21:09 timeleft--

Follow-up measurement confirms this cannot be resolved by Noul-question shortening alone. The smallest of the existing 53 production-shaped corpus cases serializes to 1,180 state tokens before any question/head syntax. laya-typed-decisions has a 1,024-token context window. Even the three-token question Promote? therefore cannot fit, and the live endpoint returns HTTP 422 as designed.

This leaves the final acceptance item—one successful full-state promotion with durable local-model provenance—unsatisfied. Threshold tuning cannot affect a request that produces no probability. Completing it would require changing the explicit full-state contract or using a model/runtime with a larger compatible context window; neither is authorized by #129.

timeleft-- avatar Sep 29 '26 21:09 timeleft--