Repository navigation
Loom v0.9.4
Routing debt closed. This release pays down the seven items from the internal routing debt record, plus the security hardening they surfaced.
Added
- feat(routing): persisted decision + outcome telemetry (
crates/loom-routing/src/outcomes.rs) — SQLite store at~/.loom/telemetry/routing.dbrecords one row per task-bound decision (signals JSON, numeric, level, tier, model, token estimates) and closes it with an outcome:completedwhen the task reaches Finish,overriddenwhen a manual tier override rejects the heuristic's pick; newloom routing outcomes [--limit N]reports recent decisions and outcome counts, giving the decision-model flip condition its evidence surface - feat(core):
[security] require_signatureconfig flag (default off) — when enabled, unsigned hooks are skipped and unsigned plugins are rejected at install; documents the trust model explicitly (loom dir contents are user-owned local state) - feat(config):
config/security.tomloverlay joins the merge chain alongsiderouting.toml/mcp.toml/hooks.toml/acp.toml - feat(core):
derive_level(numeric, thresholds)andderive_tier(level)— one exported source of truth for complexity level and model tier derivation - docs: track
ROADMAP.md(previously untracked, referenced by the routing debt record)
Changed
- refactor(routing): the level/tier derivation duplicated across
scorer.rs,router.rs,task_manager.rs(×2) and the CLI now routes throughderive_level/derive_tier; configurablecomplexity_thresholdsgovern level as well as tier, making the Supplement's "these thresholds are configurable" claim true - refactor: dedupe cross-crate helpers into
loom-core, split workflow machinery, dependency hygiene - chore: workspace
cargo fmtand clippy 1.99 drift lints (result_large_err,useless_format, borrow inprintln) - chore:
__pycache__/gitignored; release-bottle script untracked (artifact dirs are gitignored)
Fixed
- fix(routing):
extract_signalscounted bytes, not chars, inflating the length signal ~3× for UTF-8 CJK prompts and biasing CJK tasks toward higher tiers - fix(core):
ComplexityThresholdsderivedDefaultwas{0.0, 0.0}rather than the serde defaults (0.35/0.7), so any routing config without a[complexity_thresholds]section treated every score as High → Flagship - fix(routing): the level-vs-tier contradiction (config
low_max = 0.3+numeric = 0.32yieldedlevel = Lowbuttier = Mid) is resolved by the unified derivation - fix(cli):
init'srouting.tomltemplate claimed threshold defaults0.33/0.66; corrected to the shipped0.35/0.7 - fix(routing-hook): the Python hook imported third-party
toml(ImportError on any machine withoutpip install toml); now uses stdlibtomllib(Python ≥ 3.11), with the no-op-on-error contract unchanged - ci: install
protocfor the integration and test-matrix jobs; fail cargo steps properly (set -o pipefail);--all-featuresbuilds no longer break on duplicate cfg-gated imports
Security
- fix(core): plugin downloads were HTTPS-only for remote config but accepted plain
http://for plugins —install_from_urlandupdate()now reject non-HTTPS URLs before any network I/O, closing an on-path tool-TOML swap - feat(security):
require_signaturetrusts nothing unsigned when enabled — hooks skip and plugin installs fail rather than running unverified code
Tests
- test(routing): characterization suite pinning hook and scorer behavior before the refactor — 7
routing_hook.pycontract tests (plain asserts,tempfilerules files, never~/.loom), user-override precedence, and the adversarial keyword ceiling (keyword weight 0.35 clamps at max 0.35 contribution, so keywords alone cannot force Flagship on the static path) - test(routing): boundary and contradiction coverage for
derive_level/derive_tier, including the strict-<edges atlow_max/high_min(previously only the 0.5 midpoint was tested) - test(core): HTTPS rejection on install and update, unsigned-plugin policy follows the flag, half-signed manifests rejected,
securityconfig parse and default - test(routing): outcome-telemetry store and full workflow flow (create → advance ×3 → override → Finish = 4 rows: 3
completed, 1overridden)
Install: brew install tusharmewara/loom/loom (bottles attach below once the release workflow finishes).