[PR #12] [MERGED] [codex] Resolve open quality and logging issues #1806

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/12
Author: @morluto
Created: 7/12/2026
Status: ✅ Merged
Merged: 7/12/2026
Merged by: @morluto

Base: main ← Head: codex/resolve-open-issues


📝 Commits (5)

  • 03072e0 Add structured runtime logging
  • 8f035ab Enforce local and CI quality gates
  • 07a3914 Fix npm 10 lockfile compatibility
  • 12a9577 Build before coverage tests
  • d1bb959 Merge branch 'main' into codex/resolve-open-issues

📊 Changes

20 files changed (+823 additions, -42 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -2)
📝 .husky/pre-commit (+2 -1)
📝 CONTRIBUTING.md (+12 -0)
📝 knip.json (+8 -8)
📝 package-lock.json (+573 -6)
📝 package.json (+8 -0)
📝 src/application/DirectAnalysis.ts (+3 -1)
📝 src/application/runtime.ts (+6 -1)
📝 src/cli.ts (+53 -6)
📝 src/config.ts (+6 -0)
📝 src/hopper/HopperClient.ts (+16 -1)
➕ src/logger.ts (+41 -0)
📝 src/main.ts (+12 -2)
📝 src/server/createServer.ts (+6 -3)
📝 src/server/registerEnhancedTools.ts (+8 -2)
📝 src/server/registerOfficialTools.ts (+10 -4)
📝 src/server/registerSessionTools.ts (+12 -4)
➕ src/server/toolLogging.ts (+21 -0)
📝 tests/config.test.ts (+8 -0)
📝 tests/runtime.test.ts (+16 -1)

📄 Description

Summary

REA had partial quality-gate scaffolding but did not consistently enforce coverage, dead-code findings, or all requested pre-commit checks. It also lacked structured operational diagnostics, which made MCP tool and Hopper bridge failures difficult to correlate without exposing raw protocol data.

This change completes the existing quality workflows and adds redaction-safe structured logging across the CLI, MCP server, and Hopper bridge boundaries. MCP diagnostics are written to stderr so stdio frames remain valid. CLI logging is opt-in through REA_LOG_LEVEL and uses stdout when enabled, preserving machine-readable command output by default.

Changes

  • add Pino JSON logging with validated log levels and sensitive-field redaction
  • log MCP tool and Hopper bridge completion status and duration without request arguments
  • log CLI command completion and process error boundaries
  • enforce coverage in the explicit CI test job and retain the thresholds used by npm test
  • make knip findings fail the dead-code job and expose npm run lint:dead
  • run lint-staged formatting/oxlint plus full TypeScript checking before commits
  • document coverage, dead-code, hook, and logging behavior

Verification

  • npm run check
    • 115 tests passed
    • statements 69.21%, branches 67.12%, functions 67.12%, lines 71.6%
  • npm run lint:dead
  • npm run verify:package
  • git diff --check
  • autoreview in local mode: clean
  • autoreview of the committed branch against origin/main: clean

Real Hopper verification was not performed because these changes do not alter Hopper API behavior, loader selection, or bridge protocol contracts. The isolated package verifier confirmed the 42-tool target-free MCP surface.

Closes #5
Closes #6
Closes #7
Closes #8


🔄 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/12 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/12/2026 **Status:** ✅ Merged **Merged:** 7/12/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/resolve-open-issues` --- ### 📝 Commits (5) - [`03072e0`](https://github.com/morluto/rea/commit/03072e0ea793a11d22f2daacbed49c0c0456dcd9) Add structured runtime logging - [`8f035ab`](https://github.com/morluto/rea/commit/8f035abb3a45e8be01416d3a3a0f85bbb14f41b7) Enforce local and CI quality gates - [`07a3914`](https://github.com/morluto/rea/commit/07a39144aa5061072621c32f1c144843fd4bd88b) Fix npm 10 lockfile compatibility - [`12a9577`](https://github.com/morluto/rea/commit/12a95777cc27809072c3b2573e5218c5aac33546) Build before coverage tests - [`d1bb959`](https://github.com/morluto/rea/commit/d1bb959295542c499eb8e276a38fb1fd0b57ce9c) Merge branch 'main' into codex/resolve-open-issues ### 📊 Changes **20 files changed** (+823 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -2) 📝 `.husky/pre-commit` (+2 -1) 📝 `CONTRIBUTING.md` (+12 -0) 📝 `knip.json` (+8 -8) 📝 `package-lock.json` (+573 -6) 📝 `package.json` (+8 -0) 📝 `src/application/DirectAnalysis.ts` (+3 -1) 📝 `src/application/runtime.ts` (+6 -1) 📝 `src/cli.ts` (+53 -6) 📝 `src/config.ts` (+6 -0) 📝 `src/hopper/HopperClient.ts` (+16 -1) ➕ `src/logger.ts` (+41 -0) 📝 `src/main.ts` (+12 -2) 📝 `src/server/createServer.ts` (+6 -3) 📝 `src/server/registerEnhancedTools.ts` (+8 -2) 📝 `src/server/registerOfficialTools.ts` (+10 -4) 📝 `src/server/registerSessionTools.ts` (+12 -4) ➕ `src/server/toolLogging.ts` (+21 -0) 📝 `tests/config.test.ts` (+8 -0) 📝 `tests/runtime.test.ts` (+16 -1) </details> ### 📄 Description ## Summary REA had partial quality-gate scaffolding but did not consistently enforce coverage, dead-code findings, or all requested pre-commit checks. It also lacked structured operational diagnostics, which made MCP tool and Hopper bridge failures difficult to correlate without exposing raw protocol data. This change completes the existing quality workflows and adds redaction-safe structured logging across the CLI, MCP server, and Hopper bridge boundaries. MCP diagnostics are written to stderr so stdio frames remain valid. CLI logging is opt-in through `REA_LOG_LEVEL` and uses stdout when enabled, preserving machine-readable command output by default. ## Changes - add Pino JSON logging with validated log levels and sensitive-field redaction - log MCP tool and Hopper bridge completion status and duration without request arguments - log CLI command completion and process error boundaries - enforce coverage in the explicit CI test job and retain the thresholds used by `npm test` - make knip findings fail the dead-code job and expose `npm run lint:dead` - run lint-staged formatting/oxlint plus full TypeScript checking before commits - document coverage, dead-code, hook, and logging behavior ## Verification - `npm run check` - 115 tests passed - statements 69.21%, branches 67.12%, functions 67.12%, lines 71.6% - `npm run lint:dead` - `npm run verify:package` - `git diff --check` - autoreview in local mode: clean - autoreview of the committed branch against `origin/main`: clean Real Hopper verification was not performed because these changes do not alter Hopper API behavior, loader selection, or bridge protocol contracts. The isolated package verifier confirmed the 42-tool target-free MCP surface. Closes #5 Closes #6 Closes #7 Closes #8 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:11:14 +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#1806
No description provided.