Skip to content

kaizen: build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。 (#201) - #209

Merged
s-hiraoku merged 1 commit into
mainfrom
kaizen/issue-201-scout-align-build-result-string-schema-with-runt
Aug 7, 2026
Merged

kaizen: build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。 (#201)#209
s-hiraoku merged 1 commit into
mainfrom
kaizen/issue-201-scout-align-build-result-string-schema-with-runt

Conversation

@s-hiraoku

@s-hiraoku s-hiraoku commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes #201

元Issue

#201: [scout] Align build-result string schema with runtime

Summary

Align the published build-result JSON schema with the runtime normalizer for non-empty handoff strings. The runtime trims and rejects whitespace-only strings for build-result fields, but schemas/build-result.schema.json still allows whitespace-only values for several handoff fields because it uses minLength without a \S pattern.

Target repository and affected paths or components

  • Target repository: kaizen-agents-org/builder-agent
  • Affected paths/components: schemas/build-result.schema.json, src/types/BuildResult.ts, test/types/BuildResult.test.ts, scripts/validate-json.js, and build-result example validation

Observed evidence from default branch

Builder task understanding

build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。
空白のみの値を拒否し、有効値のトリムを確認する回帰テストを追加しました。

Builder notes

保護対象の schemas/build-result.schema.json を必要最小限変更しました。npm run check:dist、npm test、npm run validate:json、共有スキル存在確認はすべて成功しました。変更は未コミットです。

Provider evidence:

  • codex: exitCode=0, status=selected, failureClass=none, fallbackReason=none, payloadSource=last-message, truncatedOutput=none
    Selected backend: codex
    Final payload source: last-message

変更ファイル

  • schemas/build-result.schema.json — build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。
    空白のみの値を拒否し、有効値のトリムを確認する回帰テストを追加しました。
  • scripts/validate-json.js — build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。
    空白のみの値を拒否し、有効値のトリムを確認する回帰テストを追加しました。
  • test/types/BuildResult.test.ts — build-result スキーマの対象文字列に非空白パターンを追加し、実行時の正規化規則と一致させました。
    空白のみの値を拒否し、有効値のトリムを確認する回帰テストを追加しました。

Changed files: 3 / Changed lines: 81

Verification

  • npm run check:dist — 成功
  • npm test — 成功
  • npm run validate:json — 成功
  • test -f skills/gh-link-issue-pr/SKILL.md && test -f skills/kaizen-bug-router/SKILL.md && test -f skills/pr-guardian/SKILL.md — 成功

Verifier verdict

verifier: open_pr
summary: Open PR with 0 should_fix item(s); risk is low.
evidence: reported (未実行の可能性あり)
confidence: 82/100
risk: low
notes: evidence_grade=reported
warning: この判定は実行証拠ではなくテキスト報告に基づくため、未実行の可能性があります。

Evidence strength

  • reported: builder summary and builder notes come from the builder-agent self-report.
  • executed: Kaizen Loop ran the verification commands listed above.
  • reported: Kaizen Loop ran verifier, but verifier evidence is based on text reporting rather than execution proof.
  • static: changed file and line counts come from git diff metadata.

残存リスク / レビュー観点

Verifier cleared PR: Open PR with 0 should_fix item(s); risk is low.
confidence: 82/100
risk: low

Summary by CodeRabbit

  • Bug Fixes

    • Prevented build-result summaries, task details, changed-file entries, and residual notes from containing only whitespace.
    • Improved validation to consistently reject blank handoff values.
  • Tests

    • Added coverage for trimming, preserving valid values, and rejecting whitespace-only content across runtime and schema validation.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: kaizen-agents-org/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0653e461-0f77-444b-8673-d51ab62c5340

📥 Commits

Reviewing files that changed from the base of the PR and between ae2ecaa and 2c183da.

📒 Files selected for processing (3)
  • schemas/build-result.schema.json
  • scripts/validate-json.js
  • test/types/BuildResult.test.ts

📝 Walkthrough

Walkthrough

The build-result schema now requires non-whitespace characters in handoff strings. JSON validation and TypeScript tests cover whitespace-only rejection and trimming across summaries, task understanding, changed files, constraints, and residual notes.

Changes

Build-result validation

Layer / File(s) Summary
Schema non-whitespace constraints
schemas/build-result.schema.json
Adds \S patterns to task-understanding fields, plan summaries, changed-file entries, and residual-note entries.
Validation and regression coverage
scripts/validate-json.js, test/types/BuildResult.test.ts
Adds example and runtime checks for whitespace-only values. Expands normalization and schema tests for valid trimmed values and non-whitespace patterns.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the schema pattern additions and runtime normalization alignment.
Linked Issues check ✅ Passed The changes satisfy issue #201 by aligning schema validation with runtime behavior and adding focused regression tests.
Out of Scope Changes check ✅ Passed All changes remain limited to build-result schema fidelity, validation, and related regression tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kaizen/issue-201-scout-align-build-result-string-schema-with-runt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@s-hiraoku

Copy link
Copy Markdown
Contributor Author

PR Guardian pass 1/5 final report

  • Final mergeability: MERGEABLE / CLEAN; PR is open and not a draft.
  • Pinned head: 2c183da (unchanged from the isolated worktree initial HEAD).
  • Required checks: test passed. CodeRabbit status passed and its current-head summary reports no actionable comments.
  • CI watched: GitHub Actions CI run 31073855586 via gh run watch --exit-status; completed successfully.
  • Fixes pushed: none.
  • Feedback addressed: exhaustive paginated audit found no review threads, inline review comments, REST review records, or actionable PR comments.
  • Skipped as non-actionable: CodeRabbit optional finishing-touch controls; the successful CI run Node.js 20 action-runtime deprecation warning, which is outside this PR changed-file scope and does not fail the required check.
  • Stabilization: unchanged passing snapshots at 2026-08-06T05:24:01Z and 2026-08-06T05:25:04Z.
  • Remaining blockers: none.

@s-hiraoku
s-hiraoku merged commit ac95057 into main Aug 7, 2026
2 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.

[scout] Align build-result string schema with runtime

1 participant