Make the hash-floor gate deterministic (V-718)

Owner explicitly requested direct commits to master. Keep startup cost benchmarked without turning ambient race/coverage load into a correctness failure; record live reminder proof, stale-task reconciliation, and the temporary delegation quota caveat.
This commit is contained in:
2026-08-15 02:15:51 +04:00
parent 40bf5562bd
commit 98ab646206
4 changed files with 93 additions and 6 deletions
+58
View File
@@ -281,3 +281,61 @@ expires, and when it has been drained. `./cmd/mavend/ -run TestSuppressedCareDig
passes under race in 4.626s, the digest store and loop cases in 4.123s and passes under race in 4.626s, the digest store and loop cases in 4.123s and
1.046s, and the three full packages in 264.076s, 64.496s and 4.280s. The caveat 1.046s, and the three full packages in 264.076s, 64.496s and 4.280s. The caveat
`docs/caveats/workers.md#nudges` and the `SA4006` baseline entry are deleted. `docs/caveats/workers.md#nudges` and the `SA4006` baseline entry are deleted.
## 2026-08-15 — authoritative-state continuation
The continuation began by treating the checked-out tree and external task state
as authoritative. `master` was clean, identical to `origin/master`, and already
contained the V-717 and V-687 branch merges. Their interrupted worker messages
were therefore not used as evidence of missing work.
### Live reminder catch-up closes V-570 and V-715
The rebuilt stack loaded the resident Qwen model, multilingual ONNX embedder,
and routing heads. On its first eligible tick it phrased the three overdue
reminders once as one catch-up message. Disabled ntfy left one durable failed
attempt for delivery group `reminder #83`; ordered fallback then left exactly
one successful Telegram attempt for the same group. All originals became
`fired`. Four later ticks produced no second phrase, send, pending attempt, or
unknown attempt. `/`, `/reminders`, and `/notifications` each returned HTTP 200
with a server-generated request ID. This supplies the live evidence that was
still missing in the 2026-08-13 entry; V-715 and the stale-open V-570 are closed.
The first HTTP repro command also exposed a zsh test-harness trap: `path` is a
special array tied to `PATH`, so using it as a loop variable removed command
lookup inside the loop. The corrected probe used `probe_path` and `wget
--no-proxy`; the deployed web process had not crashed.
### Stale-open task reconciliation
The open Vikunja list was read with `done: false` and compared with the current
tree before choosing work. V-397 already described itself as done and merged;
V-557 is present as `ea0eb16` plus the forced missing-slot dialogue contract;
V-570 is covered by the live catch-up proof above. Those three records were
closed rather than reimplemented. V-651 remains open: its nil-sink and reminder
spin halves landed with V-715, but the first failed severity-4 Telegram send is
still not represented in the repeat-until-ack stream.
### Stable hash-floor performance evidence [V-718]
`TestPersonalBoundaryHashFloorLatency` coupled correctness to ambient machine
load while running a numeric training loop under race and coverage
instrumentation. It is now a deterministic fit-and-score test that also proves
the 1024-dimensional head was built. Elapsed time remains observable through
`BenchmarkPersonalBoundaryHashFloorFitAndScore`, where three one-iteration runs
on this host measured 75.1 ms, 76.8 ms and 81.4 ms without making those host
figures a CI pass condition.
The exact race-plus-coverage focused test passed in 9.445s. `make test` then
passed on its first run: formatting, vet, CW2 configuration tests, and every
internal and command package under race plus coverage; `cmd/mavend` completed
in 205.712s. This closes V-718 without raising a brittle timeout.
### Delegation availability
All three available subagent slots were filled: clarification exhaustion,
durable nudge identity, and a read-only live deployment probe. The first two
left complete merges on `master`; all three later reported the same shared
Codex usage limit, with capacity unavailable until 2026-08-20. Work continues
serially. The temporary constraint and revisit trigger are recorded at
`docs/caveats/workers.md#agent-quota` under the V-714 completion umbrella.
+23 -6
View File
@@ -186,22 +186,39 @@ func TestPersonalBoundaryFrozenHeadDecodes(t *testing.T) {
} }
} }
func TestPersonalBoundaryHashFloorLatency(t *testing.T) { func TestPersonalBoundaryHashFloorFitsAndScores(t *testing.T) {
b := &personalBoundary{} b := &personalBoundary{}
embedder := router.NewHashEmbedder(1024) embedder := router.NewHashEmbedder(1024)
query, err := router.EmbedQuery(context.Background(), embedder, "когда моя встреча") query, err := router.EmbedQuery(context.Background(), embedder, "когда моя встреча")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
started := time.Now()
b.load(context.Background(), embedder) b.load(context.Background(), embedder)
if _, _, ok := b.score(query); !ok { if _, _, ok := b.score(query); !ok {
t.Fatal("hash-floor boundary declined to score") t.Fatal("hash-floor boundary declined to score")
} }
elapsed := time.Since(started) if len(b.head.weights) != 1024 {
t.Logf("hash-floor corpus fit+score: %s", elapsed) t.Fatalf("hash-floor boundary has %d weights, want 1024", len(b.head.weights))
if elapsed > 2*time.Second { }
t.Errorf("hash-floor boundary took %s, exceeds 2s local floor ceiling", elapsed) }
// BenchmarkPersonalBoundaryHashFloorFitAndScore keeps startup cost measurable
// without making ambient CI load a correctness condition. In particular,
// -race and coverage instrumentation both multiply the cost of this numeric
// training loop; the functional test above is the deterministic gate.
func BenchmarkPersonalBoundaryHashFloorFitAndScore(b *testing.B) {
embedder := router.NewHashEmbedder(1024)
query, err := router.EmbedQuery(context.Background(), embedder, "когда моя встреча")
if err != nil {
b.Fatal(err)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
boundary := &personalBoundary{}
boundary.load(context.Background(), embedder)
if _, _, ok := boundary.score(query); !ok {
b.Fatal("hash-floor boundary declined to score")
}
} }
} }
+1
View File
@@ -40,6 +40,7 @@ sanitized mavweb problem contract was V-689.
| [Dialogue persistence errors are swallowed](storage.md#dialogue) | medium | | [Dialogue persistence errors are swallowed](storage.md#dialogue) | medium |
| [A recall miss scans two whole tables](storage.md#recall) | medium | | [A recall miss scans two whole tables](storage.md#recall) | medium |
| [Fact enrichment is a 20-call serial waterfall](workers.md#enrichment) | medium | | [Fact enrichment is a 20-call serial waterfall](workers.md#enrichment) | medium |
| [Autonomous worker delegation is temporarily quota-gated](workers.md#agent-quota) | session |
| [Committed absolute paths pin the build to this box](config.md#paths) | medium | | [Committed absolute paths pin the build to this box](config.md#paths) | medium |
| [The analyzers pass against a baseline, not zero](dependencies.md#baseline) | medium | | [The analyzers pass against a baseline, not zero](dependencies.md#baseline) | medium |
| [Domain packages depend on store and IPC types](layering.md#dtos) | low | | [Domain packages depend on store and IPC types](layering.md#dtos) | low |
+11
View File
@@ -11,3 +11,14 @@ scan, not this.
Revisit when: Nexus gets slow, or when a batch-resolution endpoint exists. Revisit when: Nexus gets slow, or when a batch-resolution endpoint exists.
Workaround: an unreachable Nexus is fine. It is the slow-but-answering case Workaround: an unreachable Nexus is fine. It is the slow-but-answering case
that hurts. that hurts.
## Autonomous worker delegation is temporarily quota-gated [#714] {#agent-quota}
Costs: the completion session can still inspect, implement and verify Maven,
but cannot parallelise independent audits after the three available workers
all returned the shared Codex usage-limit error. This is an orchestration
constraint, not a Maven runtime failure, and no repository workaround can add
worker capacity.
Revisit when: the reported quota window reopens on 2026-08-20, or the account's
worker allowance changes. Until then, keep work streams serial and record the
same verification evidence a delegated review would have produced.