feat(schema): approach template v2 (template + CI checks)#161
Conversation
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughIntroduces a structured "approach card v2" template with required YAML frontmatter (title, status, last_reviewed, use_case, primary_patterns) and six standardized body sections (Problem framing, Approaches, Comparison, Persona perspectives, Recommendation, Open questions). Updates validator to enforce these sections, frontmatter fields, and a title prefix rule ( ChangesApproach Template v2 Schema & Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
d2cf9ce to
cd7dbb3
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@approaches/_template.md`:
- Around line 16-19: The comment incorrectly mandates iptf_pocs whenever a
sub-approach has maturity: prototyped; update the body linter and documentation
text to only require the iptf_pocs field when there is an actual IPTF-internal
prototype, not merely when maturity: prototyped is set. Locate references to
"iptf_pocs" and the maturity check logic (the body linter rule that inspects
sub-approach.maturity and the template comment block) and change the condition
to check an explicit flag/marker indicating an IPTF-built prototype (e.g., an
is_ip_tf_prototype or presence of pocs[].sub_approach entry) rather than
treating maturity: prototyped as sufficient; also update the template comment to
reflect the corrected rule.
In `@CHANGELOG.md`:
- Line 7: The CHANGELOG entry for "feat(schema): approach template v2 -- replace
[_template.md]..." is missing the required PR reference suffix; update that
entry by appending the PR number in the standard format " (`#NNN`)" to the end of
the entry title (e.g., feat(schema): ... -- ... (`#123`)), matching other
[Unreleased] entries; locate the exact entry text ("feat(schema): approach
template v2 -- replace [_template.md]...") and add the PR number accordingly.
In `@scripts/validate-patterns.js`:
- Around line 679-684: The current check uses !frontmatter[field] which treats
empty arrays (e.g., primary_patterns: []) as present; change the validation in
the REQUIRED_APPROACH_FRONTMATTER loop to explicitly detect empty arrays and
missing values: for the primary_patterns field (and any other expected-array
fields) ensure you test Array.isArray(frontmatter[field]) &&
frontmatter[field].length > 0, and for non-array fields ensure
frontmatter[field] is not null/undefined/empty string; if the value fails these
checks push the same fileWarnings message. Reference:
REQUIRED_APPROACH_FRONTMATTER, frontmatter, fileWarnings, primary_patterns.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: dec5316b-83a1-4be4-b1ee-6898cd9d373f
📒 Files selected for processing (3)
CHANGELOG.mdapproaches/_template.mdscripts/validate-patterns.js
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
CHANGELOG.md
⚙️ CodeRabbit configuration file
CHANGELOG.md: Entries must go under[Unreleased], include a markdown link to the changed file,
reference the PR number(#NNN), and use a semantic prefix (feat(pattern):,feat(vendor):,fix:,docs:, etc.).
Files:
CHANGELOG.md
approaches/**/*.md
⚙️ CodeRabbit configuration file
approaches/**/*.md: This is an approach card.Structure: Validate against the template at
approaches/_template.md.
File naming and conventions are inapproaches/README.md. Filename must start withapproach-in kebab-case.Approach cards MUST link to both the use case they address and the patterns they combine.
Flag if no pattern or use case cross-references are present.Word limits: warn > 2000, error > 3000.
Files:
approaches/_template.md
🧠 Learnings (3)
📚 Learning: 2026-05-06T13:50:53.704Z
Learnt from: Meyanis95
Repo: ethereum/iptf-map PR: 160
File: approaches/approach-private-trade-settlement.md:42-62
Timestamp: 2026-05-06T13:50:53.704Z
Learning: For approach Markdown cards using the v2 schema in the ethereum/iptf-map repo, treat the use_case frontmatter slug as the canonical cross-reference to the addressed use case. Do not enforce an in-body markdown link to the use case on v2 approach cards. The in-body link requirement is a v1 convention and should not be applied to v2 cards; this distinction is tracked separately. This pattern applies to all approach Markdown files under approaches/ (e.g., approaches/**/*.md). For the file approaches/approach-private-trade-settlement.md specifically, ensure it adheres to the v2 rule by using the frontmatter use_case reference and omit enforcing in-body use-case links.
Applied to files:
approaches/_template.md
📚 Learning: 2026-05-06T13:50:59.931Z
Learnt from: Meyanis95
Repo: ethereum/iptf-map PR: 160
File: approaches/approach-private-money-market-funds.md:1-24
Timestamp: 2026-05-06T13:50:59.931Z
Learning: In iptf-map v2 approach cards, iptf_pocs is for IPTF-internal research prototypes tied to a specific sub-approach, while open_source_implementations is for third-party production-viability signals. Do not flag a missing iptf_pocs block unless an IPTF-internal prototype actually exists for that approach; a sub-approach with maturity: prototyped does not imply an IPTF PoC exists. Reviewers should: (1) verify whether an IPTF-internal prototype exists for the sub-approach in question; (2) if yes, ensure an iptf_pocs block is present and accurately describes it; (3) if no internal prototype exists, do not require an iptf_pocs block. This guideline applies to all approach markdown files under approaches/ in this repository (ethereum/iptf-map).
Applied to files:
approaches/_template.md
📚 Learning: 2026-05-06T13:50:58.986Z
Learnt from: Meyanis95
Repo: ethereum/iptf-map PR: 160
File: approaches/approach-private-broadcasting.md:1-26
Timestamp: 2026-05-06T13:50:58.986Z
Learning: Follow the v2 schema for approach cards in approaches/**/*.md. iptf_pocs is strictly for IPTF-internal research prototypes with a matching sub_approach entry; open_source_implementations covers third-party production-viability signals. Do not flag missing iptf_pocs when there is no IPTF-internal prototype for the approach card; the field is optional and must not be fabricated.
Applied to files:
approaches/_template.md
🪛 LanguageTool
approaches/_template.md
[grammar] ~90-~90: Ensure spelling is correct
Context: ...+ verification | | Proof gen (client) | XXXms | ### *(Repeat the structure above for each arc...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
Resolves 11 conflicts: - 8 patterns: take ours (v2 migration supersedes master's date bumps) - pattern-verifiable-attestation: take ours + add pattern-zk-wrappers to composes_with (preserves the cross-reference master added via #153) - _template.md, validate-patterns.js, CHANGELOG.md: take theirs (master's refinements from #157/#160/#161/#153 strictly extend batch1's baseline) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stacked on #160. Closes the "schema validation" sequencing item from #151.
What this adds
approaches/_template.md: replaced v1 stub (Overview / TLDR / Architecture / More details / Links) with the v2 skeleton from feat(schema): Approach template v2 — frontmatter, per-sub-approach structure, comparison table #151. Frontmatter + 6 required body sections (Problem framing / Approaches / Comparison / Persona perspectives / Recommendation / Open questions) + per-sub-approach YAML block + 10-row comparison-table template.scripts/validate-patterns.js: updatedvalidateApproach():REQUIRED_APPROACH_SECTIONSnow lists the v2 six (was v1## Overview/## Architecture)RECOMMENDED_APPROACH_SECTIONSremoved (v2 has no extras)REQUIRED_APPROACH_FRONTMATTERadded:title,status,last_reviewed,use_case,primary_patterns^Approach:\sReview scope
@coderabbitai please limit review to:
Out of scope (explicitly deferred)
scripts/schemas/approach.json(AJV-compiled JSON Schema) — inline validator checks cover load-bearing fields without it.validate-approach-sections.mjsfrom feat(schema): Approach template v2 — frontmatter, per-sub-approach structure, comparison table #151 §8 (per-sub-approach YAML enforcement, comparison-axis row check, sub_approach → heading resolution,iptf_pocs↔ sub-approach maturity coupling). Real work; feat(schema): Approach template v2 — frontmatter, per-sub-approach structure, comparison table #151 budgets ~1 day for it.Test plan
## Comparison(deleted from a copy of approach-private-bonds.md) tripsMissing required section: ## Comparisonuse_case:from frontmatter tripsMissing required frontmatter field: use_caseApproach:prefix tripsTitle should start with "Approach: "🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores