Skip to content

chore(release): v3.11.5#555

Merged
proffesor-for-testing merged 5 commits into
mainfrom
working-july
Jul 7, 2026
Merged

chore(release): v3.11.5#555
proffesor-for-testing merged 5 commits into
mainfrom
working-july

Conversation

@proffesor-for-testing

Copy link
Copy Markdown
Owner

Summary

System-integrity sweep of the self-learning loop plus pattern-usage stat fixes: dream-cycle insights now genuinely become reusable patterns (a gate bug meant this only ever ran in manual tests, not real scheduled cycles), pattern usage/stats bugs are fixed (double-write, id-desync lookup failures, mid-session regression), and the witness-chain, agent-topology (mincut), GOAP execution, and SONA continual-learning subsystems each had real dormant-code/data-integrity bugs fixed. Full details: CHANGELOG, audit, remediation plan.

Verification

  • npm run build — clean, all 3 bundles (CLI/index/MCP) produced.
  • npm run typecheck — 0 errors.
  • npx vitest run tests/unit/17388 passed, 13 skipped, 0 failed (628/629 files, 1 pre-existing skip).
  • npm run performance:gate15/15 gates passed.
  • npm run test:regression (test:unit:fast && test:unit:heavy && test:unit:mcp) — passed clean on a standalone re-run (7026 passed | 2 skipped, 240/240 files). One transient failure appeared only when this suite ran immediately after the full tests/unit/ sweep above, sharing a hardcoded (non-PID-unique) /tmp path in sona-persistence.test.ts; re-running standalone reproduced 0 failures, confirming it was a same-path collision between two back-to-back local runs, not a real regression.
  • npm run test:ci — 8572 passed | 10 skipped, 2 pre-existing failures (see below), neither touched by this branch's commits.
  • aqe init --auto in a fresh temp project — completed cleanly (85 skills, 60 agents, hooks/MCP/workers configured).
  • aqe --version3.11.5; aqe status → healthy; aqe learning stats → real per-domain breakdown (confirms the pattern-store stats fix); aqe agent list / aqe health → both respond cleanly (health correctly reports the background daemon as "not configured" rather than falsely healthy).
  • Isolated install check: npm pack → fresh npm install in an empty dir → node node_modules/.bin/aqe --version3.11.5, exit 0, 0 vulnerabilities.
  • Full-repo version-string audit: found .claude-plugin/plugin.json and assets/skills/skills-manifest.json had drifted stale at 3.11.0 across the last 4 releases; fixed alongside this bump.
  • Live-DB data cleanup (backed up first, before/after row counts + PRAGMA integrity_check = ok): removed 200/501 degenerate mincut placeholder rows, 530/705 dead GOAP test-fixture rows, and corrected 72 corrupted dream_insights.applied counter values back to boolean 1.

Failure modes

  • Two test:ci failures are pre-existing, not introduced by this branch — verified by checking out unmodified origin/main in an isolated git worktree and reproducing both identically:
    • tests/integration/llm/multi-provider.test.ts — 2 assertions expect stale hardcoded Claude model-ID/display-name mappings (claude-opus-4-7 / Claude Sonnet 4) that don't match this environment's actual model registry; fails identically on origin/main.
    • tests/integration/ruvector/native-hnsw-real-fixture.test.ts — expects a hardcoded recall count (1600) against this project's real, organically-growing .agentic-qe/memory.db; reproduced the exact same failure (1397) on unmodified origin/main when pointed at the same real DB (it only skips on main with a fresh/empty DB). Test design depends on live DB content rather than a frozen fixture.
  • The sona-persistence.test.ts transient failure described above only reproduces when two full local test suites are run back-to-back against the same hardcoded /tmp/agentic-qe-test-sona-persistence path (not a realistic CI scenario, which runs the suite once); the underlying A10 fix passes 100% reliably in isolation and in its normal composite run.
  • This PR does not retroactively clean the 72 pre-existing over-counted dream_insights.applied rows' history before the fix, nor several other deliberately-deferred items (hook-trigger breadth, 13/40 stub GOAP actions, dormant mincut event handlers, unsigned historical witness-chain rows) — all tracked in #554.

Required check (issue #401)

  • Every failure mode mentioned in this PR description has either (a) a test that exercises it, or (b) a linked tracking issue. "Unlikely" is not an acceptable substitute. If you wrote "I don't think this can happen but...", that sentence is a failure mode and needs a test or an issue link.

Optional context

proffesor-for-testing and others added 5 commits July 6, 2026 12:18
…ness chain, mincut, GOAP executor, and SONA

Full remediation of docs/analysis/SYSTEM-INTEGRITY-AUDIT-2026-07-04.md's
P0-P2 findings, tracked in docs/plans/SYSTEM-INTEGRITY-REMEDIATION-GOAP-PLAN-2026-07-04.md.

Highlights:
- Dream engine: real pattern creation on insight apply, error/outcome
  concept nodes from real ADR-110 data, and a follow-up fix ensuring the
  concept refresh actually runs on the real automatic path (not just via
  test wrappers); persistTaskOutcome now genuinely promotes pending
  insights instead of blindly incrementing an applied counter
- Witness chain: Ed25519 signing wired via persistent key directory,
  archival/append-after-archival bug fixed, CI verification gate added
- Mincut: real event-bus wiring (was a no-op stub) and scaffold-vertex
  detection fixes
- GOAP: real domain-API dispatch executor replacing the always-mock one
- SONA: EWC++ cold-start deadlock fixed via independent request-count
  persistence
- ADR-110 pattern-nulls wired into the real production capture path
- Daemon/snapshot visibility, TTL unit bugs, and 8 ADRs re-statused with
  additive verification notes

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… vector count (#553)

qe_patterns is the source of truth for pattern count and domain/tier
breakdown; the RVF/HNSW vector index only covers patterns that have
been embedded, so getStats() silently hid any pattern stored without
a matching embedding (aqe learning stats reported the vector count as
Total, and "By Domain" was hardcoded empty).

Also fixes the rvf-pattern-store.test.ts Stats test to attach an
isolated non-unified SQLite store per test — needed once getStats()
started reading real SQLite data, since the auto-attached ADR-046
unified store is a process-wide singleton shared across test files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…otonic stats

Three compounding bugs in the recordOutcome()/storePattern() path, found
while chasing a flaky qe_pattern_usage-count test:

- recordOutcome() wrote pattern usage twice per outcome: once via
  patternStore.recordUsage() (which already persists to the wired
  SQLitePatternStore) and again via an explicit direct SQLite call added
  only to carry metrics/feedback (which the interface didn't accept).
  Threaded metrics/feedback through IPatternStore.recordUsage() instead
  and removed the redundant write — every outcome was inflating
  qe_pattern_usage row counts and qe_patterns.usage_count by 2x.

- PatternStore.store() (in-memory backend) never applied the #447 fix
  that RvfPatternStore already had: when ON CONFLICT(name, qe_domain,
  pattern_type) preserves an existing row's id, the in-memory indices
  kept using the discarded id, so every later recordUsage()/promote()/
  delete() call silently failed against SQLite with "Pattern not found".

- SQLitePatternStore.storePattern() resolved the ON CONFLICT-preserved id
  AFTER the insert transaction, but inserted the embedding using the
  discarded id INSIDE the transaction — violating the
  qe_pattern_embeddings -> qe_patterns(id) foreign key whenever a pattern
  name collided with an existing row. Now resolves the actual id before
  the embedding insert, in the same transaction.

- QEReasoningBank.getStats() only consulted the DB aggregate when the
  in-memory counter was exactly zero, so reported totals regressed the
  moment in-memory ticked past zero mid-session (a cold-start call
  correctly showed the historical DB total; the next call after one
  recordOutcome() dropped to reporting "1"). Since qe_pattern_usage is
  written synchronously, the DB aggregate is always >= the in-memory
  counter — now takes the max of the two, keeping the number monotonic.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…k remaining work

- Backup-verified cleanup of .agentic-qe/memory.db: 200/200 degenerate
  mincut_snapshots rows, 501/501 degenerate mincut_history rows, 530/530
  test-fixture execution_results rows, 705/705 test-fixture executed_steps
  rows (all confirmed 100% junk before deleting); corrected 72
  dream_insights.applied rows corrupted by the now-fixed counter bug back
  to the correct boolean value. Full backup + before/after row counts +
  integrity check per data-protection policy.
- Fixed 4 unused-vars lint errors in goap-planner.ts/goap-execute.ts
  (2 pre-existing + 1 that surfaced after removing the first + 1 in
  goap-execute.ts). Left two genuinely unimplemented stub params
  (updateActionStats duration tracking, findSimilarPlan fuzzy matching)
  honestly marked rather than scope-expanded.
- Filed #554 to track everything from the
  system-integrity remediation that's deliberately deferred, so it isn't
  silently dropped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bumps package.json + package-lock + skills-manifest fleetVersion to
3.11.5. Also fixes .claude-plugin/plugin.json and
assets/skills/skills-manifest.json fleetVersion, which had drifted
stale at 3.11.0 across the last 4 releases (found via full-repo
version-string audit).
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Skill Validation Report

Tier Skills Validation Status
Tier 3 (Verified) Blocks PR Schema + Validator + Eval skipped
Tier 2 (Validated) Warn only Schema + Validator skipped
Tier 1 (Structured) Warn only Schema skipped
Tier 0 (Advisory) Skipped None -

Only Tier 3 failures block merge

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Suite Metrics

CI Test Metrics

Date: 2026-07-07 07:52:39 UTC
Commit: 4f22b6f

Current State

  • Total test files: 917 (target: 50)
  • Total lines: 406146 (target: 40,000)
  • Files > 600 lines: 225 (target: 0)
  • Skipped tests: 70 (target: 0)

Progress from Baseline

  • Files reduced: -491 (--115%)
  • Lines reduced: -197893 (--95%)

Generated by Optimized CI

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

MCP Tools Test Summary

Validation Results

  • Validation report not found

Unit Test Results

  • Handlers: success
  • Security: success
  • Tools/Transport: success
  • Root: success

Other Results

  • Integration Tests: success
  • Validation: success

@proffesor-for-testing proffesor-for-testing merged commit 3a5cfd4 into main Jul 7, 2026
39 of 40 checks passed
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.

1 participant