[PR #1707] [MERGED] perf(domain): avoid duplicate readiness bundle validation #4769

Closed
opened 2026-10-31 00:54:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1707
Author: @N0zoM1z0
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @N0zoM1z0

Base: main ← Head: perf/readiness-validation-1065


📝 Commits (1)

  • 0d494c4 perf(domain): avoid duplicate readiness bundle validation

📊 Changes

4 files changed (+51 additions, -16 deletions)

View changed files

📝 scripts/verify-reconstruction-readiness.mjs (+1 -5)
📝 src/domain/evidenceBundle.ts (+7 -1)
📝 src/domain/reconstructionReadiness.test.ts (+39 -0)
📝 src/domain/reconstructionReadiness.ts (+4 -10)

📄 Description

Readiness inputs already validate the complete Evidence bundle. Re-running that schema cloned and validated every record again before bundle authentication. Factor the existing authentication checks so readiness reuses its parsed bundle, and use the shared streaming canonical digest instead of allocating the complete canonical string. Semantic IDs, graph invariants, canonical manifests, and caller inputs remain checked.

Remove the verifier's unused temporary directory, which leaked when fixture preflight failed.

Validation: 22 focused domain tests and 17 compiled filesystem/CLI/MCP bundle tests; bounded single-thread typecheck, full lint/module boundaries, architecture guards, formatting, and generated documentation checks. Actual built CLI and SDK MCP analysis of a 6,686-byte JavaScript target preserved complete results, Evidence ID, text/structured parity, and ping. Readiness has no public CLI/MCP operation; its 1,422,937-byte test input embeds that real CLI Evidence. All 14 Flameox 0.2.9 paired executions preserved full report SHA-256, report/source digests, report ID, and input SHA-256. Process-wall medians were 1,207.54 → 970.29 ms; paired difference −261.49 ms, 95% interval [−303.22, −164.86] ms. These are local report-workload measurements; no end-to-end CLI or token savings claim. Actual verifier missing-fixture preflight left one unused directory before and none after. Full native readiness/provider verification was not run.

The default threaded compiler exceeded the enforced 2 GiB process-family cap; the same checks were completed using the pinned compiler's single-thread option. Resource-limited failed attempts are retained in local receipts.

Refs #1065.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1707 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `perf/readiness-validation-1065` --- ### 📝 Commits (1) - [`0d494c4`](https://github.com/morluto/rea/commit/0d494c4de7b53adc59be861359fe5951a32a6175) perf(domain): avoid duplicate readiness bundle validation ### 📊 Changes **4 files changed** (+51 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `scripts/verify-reconstruction-readiness.mjs` (+1 -5) 📝 `src/domain/evidenceBundle.ts` (+7 -1) 📝 `src/domain/reconstructionReadiness.test.ts` (+39 -0) 📝 `src/domain/reconstructionReadiness.ts` (+4 -10) </details> ### 📄 Description Readiness inputs already validate the complete Evidence bundle. Re-running that schema cloned and validated every record again before bundle authentication. Factor the existing authentication checks so readiness reuses its parsed bundle, and use the shared streaming canonical digest instead of allocating the complete canonical string. Semantic IDs, graph invariants, canonical manifests, and caller inputs remain checked. Remove the verifier's unused temporary directory, which leaked when fixture preflight failed. Validation: 22 focused domain tests and 17 compiled filesystem/CLI/MCP bundle tests; bounded single-thread typecheck, full lint/module boundaries, architecture guards, formatting, and generated documentation checks. Actual built CLI and SDK MCP analysis of a 6,686-byte JavaScript target preserved complete results, Evidence ID, text/structured parity, and ping. Readiness has no public CLI/MCP operation; its 1,422,937-byte test input embeds that real CLI Evidence. All 14 Flameox 0.2.9 paired executions preserved full report SHA-256, report/source digests, report ID, and input SHA-256. Process-wall medians were 1,207.54 → 970.29 ms; paired difference −261.49 ms, 95% interval [−303.22, −164.86] ms. These are local report-workload measurements; no end-to-end CLI or token savings claim. Actual verifier missing-fixture preflight left one unused directory before and none after. Full native readiness/provider verification was not run. The default threaded compiler exceeded the enforced 2 GiB process-family cap; the same checks were completed using the pinned compiler's single-thread option. Resource-limited failed attempts are retained in local receipts. Refs #1065. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:54:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4769
No description provided.