Skip to content

feat: PROVING GROUND — dogfood validation milestone#192

Merged
flyingrobots merged 8 commits intomainfrom
roadmap/proving-ground
Feb 12, 2026
Merged

feat: PROVING GROUND — dogfood validation milestone#192
flyingrobots merged 8 commits intomainfrom
roadmap/proving-ground

Conversation

@flyingrobots
Copy link
Owner

@flyingrobots flyingrobots commented Feb 11, 2026

Summary

  • New coverage view — code-to-spec gap analysis identifying crate:/module:/pkg: nodes lacking implements edges to specs/ADRs
  • Echo ecosystem seed — 55-node, 70-edge YAML fixture with deterministic ground truth for 5 project management questions
  • Integration tests — imports seed and validates all 5 answers against known ground truth, plus timing assertion (<60s)
  • Dogfood transcript — CLI walkthrough documenting each question, answer, and sub-millisecond query timing

All 5 questions answered correctly from graph views alone. 162 tests passing across 9 files.

Closes #191

Test plan

  • npx vitest run — 162 tests pass (143 existing + 4 coverage view + 15 proving ground)
  • Q1: milestone view finds issue:E-003, issue:E-004 as M2 blockers
  • Q2: traceability view finds adr:003-encryption-at-rest, adr:004-rest-vs-grpc as gaps
  • Q3: coverage view finds 9 of 15 crates unlinked (40% coverage)
  • Q4: onboarding view orders doc:getting-started before doc:architecture-overview
  • Q5: suggestions view finds 4 low-confidence edges (0.2–0.4)
  • All 5 queries complete in <1ms total

Summary by CodeRabbit

  • New Features

    • Added a coverage view that reports code-to-spec linkage, lists linked/unlinked items, and shows a coverage percentage.
  • Documentation

    • Added a dogfood session document with example Q&A scenarios, sample outputs, summaries, and total timing.
  • Tests

    • Added fixtures and integration tests validating seed import, multi-question workflows, coverage metrics, suggestions, and overall timing.

New imperative view that identifies crate/module/pkg nodes lacking
implements edges to spec/adr targets. Returns meta.linked, meta.unlinked,
and meta.coveragePct for PROVING GROUND Q3.
56 nodes (5 milestones, 5 specs, 5 ADRs, 5 docs, 15 crates, 11 tasks,
10 issues) and 70 edges with deterministic ground truth for 5 dogfood
questions in PROVING GROUND.
Imports Echo seed YAML (55 nodes, 70 edges) and validates ground truth
for milestone blockers, ADR gaps, crate coverage, onboarding order, and
low-confidence edge detection. All 5 queries complete in <1s.
CLI-style walkthrough of all 5 dogfood questions with answers, timing,
and commentary. All queries complete in <1ms on a 55-node graph.
Coverage view, Echo seed fixture, integration tests for 5 dogfood
questions, and session transcript. 162 tests across 9 files.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Warning

Rate limit exceeded

@flyingrobots has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📝 Walkthrough

Walkthrough

Adds PROVING GROUND dogfood artifacts: a new built-in coverage view, a 55-node/70-edge seed YAML, unit and integration tests validating five project-management queries (with timing), and a static dogfood session transcript document.

Changes

Cohort / File(s) Summary
Coverage View Implementation
src/views.js
Adds a new built-in coverage view that selects code nodes (crate/module/pkg) and spec nodes (spec/adr), computes linked/unlinked code via implements edges, returns a subgraph and meta (linked, unlinked, coveragePct).
Coverage View Unit Tests
test/views.test.js
Adds tests for various coverage scenarios (partial, full, empty, module/pkg inclusion); asserts meta.linked, meta.unlinked, and meta.coveragePct.
Integration Test & Seed Data
test/proving-ground.test.js, test/fixtures/echo-seed.yaml
Adds deterministic seed fixture (~55 nodes, ~70 edges) and an integration test that imports the seed, runs five queries (M2 blockers, ADR gaps, crate coverage, onboarding order, low-confidence edges), asserts specific results and that total runtime < 60s.
Dogfood Session Documentation
docs/dogfood-session.md
Adds a static transcript with example commands, JSON outputs, per-question concise answers, timing notes, consolidated summary, and total runtime claim.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant TestRunner as TestRunner
participant Graph as GraphStore
participant ViewEngine as ViewEngine
participant Status as StatusComputer
TestRunner->>Graph: initGraph(tmpDir)
TestRunner->>Graph: importFile(test/fixtures/echo-seed.yaml)
TestRunner->>ViewEngine: renderView("coverage")
ViewEngine->>Graph: query nodes by prefix (crate/module/pkg, spec/adr) and edges (implements)
ViewEngine->>ViewEngine: compute linked/unlinked sets, subgraph, coveragePct
ViewEngine-->>TestRunner: return { nodes, edges, meta }
TestRunner->>ViewEngine: renderView("milestone"/"traceability"/"onboarding"/"suggestions")
ViewEngine->>Graph: query relevant nodes/edges
ViewEngine-->>TestRunner: results for each question
TestRunner->>Status: computeStatus(suggestions result)
Status-->>TestRunner: return status (incl. low-confidence edges)
Note over TestRunner,ViewEngine: Aggregate timing measurement (< 60s)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰
I hopped through nodes and edges today,
Mapped specs to crates in tidy array,
Seeds and tests guided my round,
Five questions answered on proving ground,
A tiny carrot flag I proudly display 🥕

🚥 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 accurately describes the main objective: adding a dogfood validation milestone for the PROVING GROUND with a coverage view, seed fixture, integration tests, and documentation.
Linked Issues check ✅ Passed All four coding requirements from #191 are met: coverage view implemented, Echo ecosystem seed provided, integration tests validate all five questions, and dogfood transcript added.
Out of Scope Changes check ✅ Passed All changes directly support the PR objectives: documentation file, coverage view, test fixtures, integration tests, and view tests are all in scope for the PROVING GROUND milestone.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch roadmap/proving-ground

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@test/fixtures/echo-seed.yaml`:
- Around line 1-228: YAML linter flags are due to flow mappings with spaces
inside braces used across node property blocks like the milestone nodes
("milestone:M1", "milestone:M2", ...), ADRs ("adr:003-encryption-at-rest"), docs
("doc:getting-started"), crates ("crate:echo-core"), tasks ("task:E-005"), and
issues ("issue:E-001"); fix by converting those flow mappings to block-style
mappings (e.g., replace { title: "...", status: "..." } with newline indented
key: value pairs) or, if you prefer to keep flow style, update the yamllint
configuration to relax the braces rule so these mappings no longer produce "too
many spaces inside braces" warnings.

In `@test/proving-ground.test.js`:
- Around line 173-186: The timing test in the describe('timing') / it('all 5
queries complete in under 60s total') block uses an overly large 60_000ms
threshold; tighten this to a realistic CI-safe bound (e.g. 2_000ms) to increase
regression signal. Locate the test that calls renderView(graph, ...) five times
and replace the expect(elapsed).toBeLessThan(60_000) assertion with a stricter
assertion like expect(elapsed).toBeLessThan(2_000), keeping the same
performance.now measurement and variable names.
- Around line 162-168: The test "low-confidence edges have expected confidence
values" collects confidences via renderView and then calls .sort() which uses
lexicographic ordering; change the sort to use a numeric comparator (e.g., in
the confidences assignment that maps e => e.props?.confidence, call .sort((a, b)
=> a - b) or otherwise convert to numbers before sorting) so the array is
ordered numerically; update the confidences variable in this test to use the
numeric comparator to avoid future lexicographic ordering bugs.
- Around line 39-57: The test file creates an implicit ordering dependency by
running importFile(graph, SEED_PATH) inside a test case so subsequent describes
rely on that side-effect; move the actual import into a beforeAll hook so the
seed is loaded once before any tests run, then keep the existing "seed import"
describe for assertions only by replacing the import call there with checks that
rely on the already-imported state (references: importFile, SEED_PATH, graph,
and the "seed import" describe block).

- Convert YAML node properties to block-style (yamllint)
- Move seed import into beforeAll (ordering dependency)
- Use numeric comparator for confidence sort
- Replace wall-clock timing test with O(N+E) complexity verification
@flyingrobots
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@test/proving-ground.test.js`:
- Around line 255-281: Wrap each per-size iteration so the temp dir returned by
generateGraph is always removed even if renderView throws: after calling
generateGraph(...) and before renderView calls in the loop, ensure you use
try/finally (or collect dirs and clean in afterAll) and call rm(dir, {
recursive: true, force: true }) in the finally block to avoid leaking
directories; additionally, when computing growthFactor from the timings array,
guard the denominator to avoid tiny/zero division by using something like
Math.max(timings[i - 1], 1) when calculating growthFactor = timings[i] /
Math.max(timings[i - 1], 1) so spurious huge ratios cannot occur.

- Wrap view rendering in try/finally for temp dir cleanup
- Guard growth factor denominator with Math.max(..., 1)
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@test/proving-ground.test.js`:
- Around line 176-177: The comment above the synthetic graph generator is
inaccurate: it says "~2N edges" but the edge-creation loops actually produce
about 0.7N edges (expression N/5 + N/5 + (N/5−1) + (N/10−1) + 4). Update that
comment near the graph generator (referencing nodeCount and the edge-creation
loops in this test) to state the correct approximate edge count (≈0.7N or give
the explicit expression) so the docstring matches the implemented logic.

@flyingrobots flyingrobots merged commit 8a81c43 into main Feb 12, 2026
6 checks passed
@flyingrobots flyingrobots deleted the roadmap/proving-ground branch February 12, 2026 11:11
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.

feat: PROVING GROUND — dogfood validation milestone

1 participant