Skip to content

test(recovery): simplify byte encoding in signed child fixtures - #5262

Merged
kwakayama merged 1 commit into
mainfrom
chore/sonar-fixture-byte-encoding-batch-47
Oct 18, 2026
Merged

kwakayama merged 1 commit into
mainfrom
chore/sonar-fixture-byte-encoding-batch-47

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The managed-recovery crash fixture removes base64 padding with a regex that Sonar Cloud flags for backtracking. Replace it with literal padding removal and use code-point conversion for the byte-only DER/base64 inputs in both recovery child fixtures. Uint8Array bounds every converted value to 0..255, and btoa emits equals signs only as padding, so the encoded keys, hashes, and signatures stay byte-identical.

This focused reliability batch targets four Cloud findings. Full-file local analysis reduces from 9 to 6 by clearing three byte-conversion findings; its profile does not report the Cloud regex rule. No new local issues or suppressions. Remaining async callbacks retain their promise contract and rejection behavior.

Validation:

  • All 8 recovery-session owner tests pass before and after editing, including the real expiry subprocess.
  • All 69,633 before/after byte-array comparisons match, covering every two-byte combination and lengths 0..4096. Sixteen generated Ed25519 key/token comparisons preserve SPKI bytes and verify signatures.
  • Both affected fixtures typecheck; affected lint/format checks and git diff --check pass.
  • Complete diff, early signing-key/env initialization, DER conversion, JWS header/payload/hash/signature encoding, and recovery-owner fixture caller reviewed.

Production code and recovery scheduling are unchanged. The HTTP/PostgreSQL crash scenario was not run locally; encoding equivalence and the owner subprocess are verified here. All current-commit CI workflows pass. Sonar Cloud quality gate passes with zero new open issues and 0.0% new duplication.

@github-actions

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 65 360 KiB ✅ 0
src/react/components/Head.tsx 5 74 KiB ✅ 0
src/react/router/index.tsx 5 74 KiB ✅ 0
src/react/context/index.tsx 5 74 KiB ✅ 0
src/react/fonts/index.ts 6 81 KiB ✅ 0
src/react/components/ui/index.ts 111 715 KiB ✅ 0
src/react/components/ui/adapter/contract.ts 1 18 KiB ✅ 0
src/react/components/ui/icons/index.ts 3 17 KiB ✅ 0
src/chat/index.ts 301 2015 KiB ✅ 0
src/chat/ag-ui.ts 61 455 KiB ✅ 0
src/chat/protocol.ts 1 11 KiB ✅ 0
src/chat/types.ts 45 240 KiB ✅ 0
src/chat/message-prep.ts 65 506 KiB ✅ 0
src/markdown/index.ts 6 30 KiB ✅ 0
src/mdx/index.ts 2 2 KiB ✅ 0
src/agent/identity-contracts.ts 1 2 KiB ✅ 0
src/schemas/index.ts 42 214 KiB ✅ 0
src/platform/env.ts 5 53 KiB ✅ 0
src/workflow/claude-code/react/index.ts 9 88 KiB ✅ 0
src/events/index.ts 31 568 KiB ✅ 0
src/events/ag-ui/public.ts 30 561 KiB ✅ 0
src/run-events/index.ts 53 315 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kojiwakayama
kojiwakayama marked this pull request as ready for review October 18, 2026 00:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T00:05:38.669969Z dbed656 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: dbed65652b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@kwakayama
kwakayama added this pull request to the merge queue Oct 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

Merged via the queue into main with commit db64ceb Oct 18, 2026
444 checks passed
@kwakayama
kwakayama deleted the chore/sonar-fixture-byte-encoding-batch-47 branch October 18, 2026 00:37
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.

2 participants