Skip to content

chore(deploy): sync live-rules.json with the live rule set (#855) - #858

Merged
eaitbrahim merged 2 commits into
mainfrom
chore/sync-live-rules-manifest
Sep 28, 2026
Merged

eaitbrahim merged 2 commits into
mainfrom
chore/sync-live-rules-manifest

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Closes #855

Regenerates deploy/live-rules.json from the live rule set. I made a read-only copy of ~/keel/keel-live.db with Python's sqlite3 backup API (source opened mode=ro) into a scratch dir, and ran scripts/rule_manifest.py export against that copy. Nothing under ~/keel was written.

Live DCA rules (status live)

id product budget per buy cadence
6 BTC-USD $40 7 days
8 ETH-USD $25 7 days
9 PAXG-USD $25 14 days
10 ADA-USD $15 14 days
11 XLM-USD $15 14 days
12 DOGE-USD $15 14 days
13 FET-USD $15 14 days

All seven have dip_bonus_pct 0 and lookback_days 90.

The turtles are paper. The six turtle_breakout rules (BTC, ETH, PAXG, ADA, XLM, DOGE) are status: paper. The old manifest listed five of them as live.

Rulings

  • Updated test_committed_manifest_is_valid. It pinned exactly one DCA rule and pinned that rule's params to Dca's constructor defaults. The regenerated manifest breaks both: there are 7 DCA rules, and none uses the default $50. The test comment itself says to update it when this happens. It now asserts:
  • Refreshed one sentence in scripts/rule_manifest.py's module docstring. It said the live DCA rule is 50 on purpose, matching the default. That is no longer true.
    • Why: keel keeps its rules in docstrings, and a stale one misleads.
    • Cost if wrong: none.

Test evidence

  • uv run pytest -q: 7027 passed, 3 skipped (exit 0)
  • ruff check keel tests scripts: exit 0
  • ruff format --check keel tests scripts: exit 0
  • mypy: exit 0
  • Mutation checks. For each, I confirmed the file differed from a saved copy before running, then restored it from that copy:
    • set BTC budget_usd to "50", so the rule equals the defaults: the value assertion fails, naming BTC-USD;
    • set one DCA rule's status to paper: the status assertion fails.

🤖 Generated with Claude Code

Regenerated with `scripts/rule_manifest.py export` against a read-only
sqlite3 backup of ~/keel/keel-live.db. The manifest now lists the seven
live DCA rules (BTC $40/7d, ETH $25/7d, PAXG $25/14d, ADA/XLM/DOGE/FET
$15/14d) and the six turtle rules at status=paper.

test_committed_manifest_is_valid pinned exactly one DCA rule and pinned
that its params equal Dca's constructor defaults. Neither holds for the
live set: it now asserts every DCA rule is live, no rule is candidate,
and every DCA rule differs from the constructor defaults on at least one
param, so a keel init reseed shows as a value change too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim eaitbrahim self-assigned this Sep 28, 2026
Comment thread deploy/live-rules.json
Comment thread scripts/rule_manifest.py
…CA status only (#855)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim
eaitbrahim merged commit a78f681 into main Sep 28, 2026
4 checks passed
@eaitbrahim
eaitbrahim deleted the chore/sync-live-rules-manifest branch September 28, 2026 09:59
eaitbrahim added a commit that referenced this pull request Sep 28, 2026
…n and its read-only card (#877)

MINOR: a rail changes scope for DCA (#869) and new commands and routes land
(#846, #850). No schema change since 0.19.0.

What lands:
  #846 (#831 follow-up) -- keel dca plan: schedule by target weights within
  rail 14's worst calendar month; [Y] writes candidate rules only.
  #850 -- GET /api/dca-plan and a read-only card on /rules.
  #869 (#853) -- rail 6 (per-asset) no longer vetoes DCA buys; the plan
  blocks on rail 3 and warns on rail 5.
  #867 (#854), #876 (#874) -- a blocked plan names the largest passing
  budget and smallest passing buffer, clearing rails 14, 3 and 2.
  #870 (#856) -- admission screen cached 5 minutes.
  #858 (#855) -- deploy/live-rules.json synced.
  #859 (#857) -- design spec for the DCA sleeve's sell side.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Sync deploy/live-rules.json with the live rule set

1 participant