Files
ruflo/scripts
ruv 48cb0a7ee8 feat(neural-trader): #2068 ADR-126 Phase 4 — Ed25519-signed backtest artifacts
Add cryptographic tamper-evidence to the paper→live promotion gate.
Mirrors the CWE-347 plugin-registry pattern (#1922): canonical body =
JSON.stringify without signature fields; verifier pins to a caller-
supplied trustedPublicKey, NOT to the served self-asserted
witnessPublicKey (which an attacker can swap freely).

- src/signed-artifact.{ts,mjs}: SignedBacktestArtifact schema + signer
  + verifier. Both files kept in sync; .mjs is the runtime the smoke
  imports directly (plugin has no build step).
- skills/trader-backtest: signs the artifact before store. Resolves
  the key via RUFLO_WITNESS_KEY_PATH → verification/witness-key.json
  → loud degraded-unsigned warning. Never silent.
- skills/trader-cloud-backtest: verifies the artifact against the
  pinned trusted pubkey BEFORE promoting to a live strategy. Refuses
  to promote on verify failure (fail-closed).
- scripts/smoke-neural-trader-backtest-signing.mjs: three-layer smoke
  modeled on smoke-plugin-registry-signature.mjs. Static contract,
  crypto round-trip (tampered/empty/swapped-served-key/wrong-trusted-key),
  and call-site byte check on the SKILL.md files.
- .github/workflows/v3-ci.yml: neural-trader-backtest-signing-smoke job
  + path triggers for the artifact files + both skill SKILL.md files.

Smoke output: 21/21 checks pass. Phase 3 portfolio-CG smoke unchanged.
Plugin smoke (scripts/smoke.sh): 11/11 still pass.

Refs #2068

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-19 22:39:21 -04:00
..
2026-01-04 19:30:59 +00:00