Fix what a second independent reading of the Phase 8 fixes found
ci / test (postgres) (push) Failing after 6m9s
ci / test (sqlite) (push) Successful in 7m6s
ci / image (push) Skipped
ci / test (postgres) (pull_request) Successful in 5m51s
ci / test (sqlite) (pull_request) Successful in 7m3s
ci / image (pull_request) Successful in 1m51s

One funded signal was enough to start the model for good, because the interval
of a few cases had no width: it now takes a hundred, weighed among themselves.
A computer always off at 03:00 never made the night of the model: a job to make
up for counts from the first start that knows it, and the night waits for the
bars of the absence. Stories are seen as they were when the decision was due, a
report already out does not close a label, an undone promotion starts the trial
again, and the trade card finds the estimate of an example born earlier.

ADR 0018 point 18 has the list; each defect has its test.

refs #67

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 14:27:03 +01:00
1 parent 0b0f4a5e75
commit c7e462b6f4
18 files changed
+371 -26

No files matched your search

+13
View File
@@ -1,6 +1,7 @@
using Anubis.Backtest;
using Anubis.Core;
using Anubis.Data;
using Anubis.Db;
using Anubis.Learning;
using Anubis.Strategies;
using Anubis.Trading;
@@ -99,11 +100,23 @@ public sealed class LearningCasesTests
await s.ExecuteAsync(
"INSERT INTO news_stories (id, title, title_key, published_at, first_seen_at, last_seen_at, sources, trusted, score, importance, created_at, updated_at) " +
"VALUES (@id, @t, @t, @p, @f, @f, 1, @yes, @s, 1, @f, @f)", ("id", id), ("t", title), ("p", published), ("f", seen), ("yes", true), ("s", score)).ConfigureAwait(false);
await ArticleAsync(s, rig, id, title, published, seen, score).ConfigureAwait(false);
await s.ExecuteAsync("INSERT INTO news_links (id, story_id, scope, target, via, created_at) VALUES (@id, @st, 'instrument', 'okx:BTC-EUR', 'name', @f)",
("id", Ids.NewId(rig.Clock)), ("st", id), ("f", seen)).ConfigureAwait(false);
}).ConfigureAwait(false);
}
/// <summary>An article of a story, saved at a moment, from a source of its own.</summary>
internal static async Task ArticleAsync(DbSession s, TradingRig rig, Guid story, string title, DateTimeOffset published, DateTimeOffset saved, double score, int importance = 1)
{
var (source, item) = (Ids.NewId(rig.Clock), Ids.NewId(rig.Clock));
await s.ExecuteAsync("INSERT INTO news_sources (id, url, name, kind, trusted, enabled, failures, created_at, updated_at) VALUES (@id, @u, @u, 'rss', @yes, @yes, 0, @f, @f)",
("id", source), ("u", "https://t/" + source), ("yes", true), ("f", saved)).ConfigureAwait(false);
await s.ExecuteAsync("INSERT INTO news_items (id, story_id, source_id, url, url_key, publisher, title, language, published_at, score, importance, created_at) " +
"VALUES (@id, @st, @so, @u, @u, @pub, @t, 'en', @p, @s, @i, @f)", ("id", item), ("st", story), ("so", source), ("u", "https://t/a/" + item), ("pub", "t" + source), ("t", title), ("p", published), ("s", score),
("i", importance), ("f", saved)).ConfigureAwait(false);
}
/// <summary>Enters while not held, on a fixed day leaves; every day proposes again what it does not hold.</summary>
private sealed class Stubborn(DateOnly from, DateOnly exit, decimal weight = 0.3m, decimal? stop = null) : IStrategy
{