[PR #629] [MERGED] refactor(runtime): centralize safe JSON parsing and preserve error causes #2127

Closed
opened 2026-10-16 21:14:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: cleanup/pr-7-safe-json-errors


📝 Commits (8)

  • a8394b0 refactor(domain): consolidate canonical ordering and digest helpers (#624)
  • 2794583 chore(config): remove dead eslint, dedupe scripts, cacheable turbo tasks
  • dad0aa9 fix(config): hash all test inputs for cached runs
  • 7bf3870 docs: fix architecture diagram and pretty-print tool catalog
  • 440268c test: extract shared fixtures, drop knip carve-outs
  • f9877e5 refactor(app): split Setup and ProcessOwnership modules
  • 080414a refactor(runtime): centralize safe JSON parsing and preserve error causes
  • 2fae230 fix(runtime): retain JSON parse error causes

📊 Changes

82 files changed (+1159 additions, -997 deletions)

View changed files

📝 .jscpd.json (+2 -2)
📝 .oxlintrc.json (+12 -1)
📝 docs/architecture.mermaid (+14 -3)
➖ eslint.config.js (+0 -28)
📝 knip.json (+1 -12)
📝 package.json (+2 -3)
📝 scripts/generate-mcp-tool-catalog.mjs (+2 -0)
📝 src/application/BinarySession.ts (+6 -2)
📝 src/application/ProcessCaptureLifecycle.ts (+2 -4)
📝 src/application/ProcessHarness.ts (+1 -1)
📝 src/application/Setup.configuration.test.ts (+2 -1)
📝 src/application/Setup.discovery.test.ts (+1 -1)
📝 src/application/Setup.fixture.ts (+3 -3)
📝 src/application/Setup.planning.test.ts (+2 -1)
📝 src/application/Setup.ts (+21 -341)
📝 src/application/SetupClientConfiguration.ts (+1 -1)
📝 src/application/SetupClients.ts (+2 -2)
➕ src/application/SetupHost.ts (+149 -0)
📝 src/application/SetupPlan.ts (+2 -2)
➕ src/application/SetupTypes.ts (+180 -0)

...and 62 more files

📄 Description

Stack 6/7 (base: stack 5/7, merge in order).

Adds domain/safeJson.safeParseJson and migrates all raw JSON.parse call sites. Names catch causes and preserves failure reasons; genuine best-effort cleanup is annotated. Verification: tsc clean.


🔄 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/629 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `cleanup/pr-7-safe-json-errors` --- ### 📝 Commits (8) - [`a8394b0`](https://github.com/morluto/rea/commit/a8394b087156c55640b5b620aececf498b60e3a0) refactor(domain): consolidate canonical ordering and digest helpers (#624) - [`2794583`](https://github.com/morluto/rea/commit/2794583a0ea56b12839c1043f684c7b32ce6fc5d) chore(config): remove dead eslint, dedupe scripts, cacheable turbo tasks - [`dad0aa9`](https://github.com/morluto/rea/commit/dad0aa9578fa5a187cdc3c62d8b5adfeffa6df66) fix(config): hash all test inputs for cached runs - [`7bf3870`](https://github.com/morluto/rea/commit/7bf3870cd6fd642fd7a9039777ad6ea327e3ebd2) docs: fix architecture diagram and pretty-print tool catalog - [`440268c`](https://github.com/morluto/rea/commit/440268c04a91f79e7e784882577244c4e13c005c) test: extract shared fixtures, drop knip carve-outs - [`f9877e5`](https://github.com/morluto/rea/commit/f9877e56f8446c38f619e91193ac81604e274a24) refactor(app): split Setup and ProcessOwnership modules - [`080414a`](https://github.com/morluto/rea/commit/080414ab751f31bae30a6ab30dca0ab02f866519) refactor(runtime): centralize safe JSON parsing and preserve error causes - [`2fae230`](https://github.com/morluto/rea/commit/2fae2309edc7d908ffbccdf720b2e403571ed241) fix(runtime): retain JSON parse error causes ### 📊 Changes **82 files changed** (+1159 additions, -997 deletions) <details> <summary>View changed files</summary> 📝 `.jscpd.json` (+2 -2) 📝 `.oxlintrc.json` (+12 -1) 📝 `docs/architecture.mermaid` (+14 -3) ➖ `eslint.config.js` (+0 -28) 📝 `knip.json` (+1 -12) 📝 `package.json` (+2 -3) 📝 `scripts/generate-mcp-tool-catalog.mjs` (+2 -0) 📝 `src/application/BinarySession.ts` (+6 -2) 📝 `src/application/ProcessCaptureLifecycle.ts` (+2 -4) 📝 `src/application/ProcessHarness.ts` (+1 -1) 📝 `src/application/Setup.configuration.test.ts` (+2 -1) 📝 `src/application/Setup.discovery.test.ts` (+1 -1) 📝 `src/application/Setup.fixture.ts` (+3 -3) 📝 `src/application/Setup.planning.test.ts` (+2 -1) 📝 `src/application/Setup.ts` (+21 -341) 📝 `src/application/SetupClientConfiguration.ts` (+1 -1) 📝 `src/application/SetupClients.ts` (+2 -2) ➕ `src/application/SetupHost.ts` (+149 -0) 📝 `src/application/SetupPlan.ts` (+2 -2) ➕ `src/application/SetupTypes.ts` (+180 -0) _...and 62 more files_ </details> ### 📄 Description Stack 6/7 (base: stack 5/7, merge in order). Adds domain/safeJson.safeParseJson and migrates all raw JSON.parse call sites. Names catch causes and preserves failure reasons; genuine best-effort cleanup is annotated. Verification: tsc clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:39 +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#2127
No description provided.