Skip to content

Restore frontmatter schema consistency coverage - #52577

Merged
pelikhan merged 5 commits into
mainfrom
copilot/deep-report-schema-consistency-tooling
Aug 14, 2026
Merged

Restore frontmatter schema consistency coverage#52577
pelikhan merged 5 commits into
mainfrom
copilot/deep-report-schema-consistency-tooling

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Schema-consistency reporting inspected stale parser files and missed the active frontmatter type surface. The generated full reference also omitted searchable entries for two supported fields.

  • Schema consistency workflow

    • Extract frontmatter fields from pkg/workflow/frontmatter_types.go.
    • Include both json and yaml tags.
    • Rename report fields and gap metrics to reflect the frontmatter implementation surface.
  • Generated frontmatter reference

    • Support dynamic-key schemas defined through patternProperties.
    • Annotate runtime examples with node, exposing nested runtime fields including:
      runtimes:
        node:
          run-install-scripts: true
    • Include:
      safe-outputs:
        report-failed-jobs: true
  • Regression coverage

    • Assert both fields remain present in generated output.
    • Update stale schema-generator expectations for current engine and reference shapes.

Run: https://github.com/github/gh-aw/actions/runs/31767348894> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 23.3 AIC · ⌖ 5.78 AIC · ⊞ 8.5K ·

Comment /souschef to run again

Copilot AI and others added 2 commits August 13, 2026 20:10
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix schema-consistency tooling inspection target Restore frontmatter schema consistency coverage Aug 13, 2026
Copilot AI requested a review from pelikhan August 13, 2026 20:15
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category: chore · Risk: low · Priority: low · Score: 33/100

Impact Urgency Quality
15/50 8/30 10/20

Recommended action: batch_review (batch: wf-tooling-drafts)

Restores schema-consistency coverage by extracting fields directly from frontmatter_types.go. Draft, no CI yet. Grouped with other draft workflow/tooling PRs for a combined review pass.

Generated by 🔧 PR Triage Agent · auto · 58.4 AIC · ⌖ 2.92 AIC · ⊞ 7.8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 14, 2026 03:08
Copilot AI balanced review requested due to automatic review settings August 14, 2026 03:08
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #52577

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (only 1 addition detected).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Completed PR review for #52577; no GitHub writes emitted because no actionable review findings were identified.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict

I didn't find any blocking issues in the changed lines.

Review notes

I checked the schema-doc generator change for the new patternProperties path, the schema-consistency workflow updates to the active frontmatter type surface, and the regression tests added for the generated reference output. The implementation and tests line up with the schema changes, and I did not find a correctness or maintainability problem in the diff that warrants a review comment.

🔎 Code quality review by PR Code Quality Reviewer · gpt54 · 14 AIC · ⌖ 5.17 AIC · ⊞ 6.5K
Comment /review to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Restores schema-consistency checks against active frontmatter types and expands generated reference coverage.

Changes:

  • Targets active JSON/YAML frontmatter fields.
  • Supports patternProperties examples.
  • Adds regression assertions and regenerated documentation.
Show a summary per file
File Description
.github/workflows/schema-consistency-checker.md Updates schema comparison inputs and reporting.
.github/workflows/schema-consistency-checker.lock.yml Regenerates the compiled workflow.
scripts/generate-schema-docs.js Expands dynamic-key schemas.
scripts/generate-schema-docs.test.js Adds regression checks.
pkg/parser/schemas/main_workflow_schema.json Annotates the runtime example key.
docs/src/content/docs/reference/frontmatter-full.md Adds missing searchable fields.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines 49 to 53
FRONTMATTER_FIELDS=$(grep -Eho '(json|yaml):"[^"]*"' pkg/workflow/frontmatter_types.go 2>/dev/null \
| sed -E 's/^(json|yaml):"//;s/"$//' \
| sed 's/,omitempty//' \
| sed 's/,.*$//' \
| grep -v '^-$' \

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes are correct and well-scoped.

  • Extracting frontmatter fields from pkg/workflow/frontmatter_types.go instead of pkg/parser/*.go is the right fix — the parser package only has a logger declaration for frontmatter.
  • The new getDynamicProperty helper correctly handles both additionalProperties and patternProperties schemas, fixing the silent skip for the runtimes field (which uses patternProperties).
  • Test 8 correction (removing #/properties/defaults) is valid — defaults is not a root schema property.
  • All tests pass (node scripts/generate-schema-docs.test.js → ✅ All tests passed).

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 40.4 AIC · ⌖ 7.04 AIC · ⊞ 5.4K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /tdd and /codebase-design — requesting changes on two correctness issues.

📋 Key Themes & Highlights

Key Themes

  • Test signal loss: Two test assertions were weakened ("claude""example-value", #/properties/defaults removed) without replacement coverage, reducing confidence that the doc generator correctly resolves real values.
  • Null-safety gap: getDynamicProperty can return null for multi-pattern schemas; both call sites use the result without a null guard, risking a runtime TypeError.

Positive Highlights

  • ✅ Correctly redirecting the schema-consistency checker to pkg/workflow/frontmatter_types.go — this was the real source file all along.
  • ✅ The getDynamicProperty refactor is a good abstraction that removes duplication between generateVariants and generateProperty.
  • ✅ New regression tests for run-install-scripts and report-failed-jobs in Test 11 are a solid addition.
  • x-example-key added to the runtimes schema entry cleanly solves the {} placeholder problem.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 41.9 AIC · ⌖ 8.58 AIC · ⊞ 7K
Comment /matt to run again

Comments that could not be inline-anchored

scripts/generate-schema-docs.test.js:66

[/tdd] The assertion was updated from &#39;engine: &quot;claude&quot;&#39; to &#39;engine: &quot;example-value&quot;&#39; — this no longer verifies meaningful output. Any string fallback would pass; if getExampleValue ever silently regresses (e.g. returns null or empty), the test stays green.

<details>
<summary>💡 Suggested fix</summary>

The engine_config $ref is a oneOf with no enum on the string branch, so the generator falls back to &quot;example-value&quot;. To preserve signal:

  1. Add a default (e.g. `"copilot"…
scripts/generate-schema-docs.test.js:108

[/tdd] Removing &quot;#/properties/defaults&quot; from allRefs silently skips ref-resolution coverage for defaults. The comment says "Defaults is nested within safe-output configuration" — but that may change and removing the assertion offers no protection.

<details>
<summary>💡 Suggested fix</summary>

If defaults is now a sub-property rather than a root schema property, add an assertion targeting its actual location:

assertContains(output, &#39;defaults:&#39;, &#39;defaults should be present in…

</details>

<details><summary>scripts/generate-schema-docs.js:96</summary>

**[/codebase-design]** `getDynamicProperty` silently returns `null` when `patternProperties` has more than one entry. Nothing in the calling code guards against `null`, so a schema with two patterns would produce a runtime `TypeError` (`Cannot read properties of null`).

&lt;details&gt;
&lt;summary&gt;💡 Suggested fix&lt;/summary&gt;

```js
// In getDynamicProperty, consider returning the first entry even with multiple patterns:
if (patternProperties.length &gt;= 1 &amp;&amp; typeof patternProperties[0] === &#39;object&#39;) {
  r…

</details>

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

⚠️ Test Quality Score: N/A — Test Modification

This PR modifies an existing test suite without adding new test functions. Changes focus on test value updates and extended assertion coverage for new schema features.

📊 Analysis Summary
Aspect Details
Test Files Changed 1 (JavaScript: scripts/generate-schema-docs.test.js)
New Test Functions 0
Modified Assertions 4 new assertContains calls added
Test Inflation Ratio 8/24 = 0.33 (✅ acceptable, < 2:1)
Hard Violations 0

Changes Breakdown:

  • Updated hardcoded test values: "claude""example-value" (2 lines)
  • Clarified schema property structure with comment (1 line)
  • Extended Test 11: Added 2 assertions for dynamic-key property expansion (2 assertions)
⚠️ Quality Observations

Strengths:

  • ✅ Test values updated to match schema specification (generic placeholder over hardcoded engine name)
  • ✅ New assertions extend coverage for dynamic-key schema properties (run-install-scripts, report-failed-jobs)
  • ✅ Code clarity improved with schema structure comment
  • ✅ Test inflation ratio well below 2:1 threshold

Concerns:

  • ⚠️ Test values are hardcoded strings tied to documentation output format (fragile to output changes)
  • ⚠️ These tests verify documentation generation implementation rather than behavioral contracts
  • ⚠️ No new error-case or edge-case assertions added

Verdict

Passed. This is a test maintenance and extension PR with no new test functions. Modifications appropriately:

  1. Align test expectations with schema structure changes
  2. Extend coverage for new dynamic-key feature
  3. Improve code clarity

No violations detected. Test inflation acceptable.

🧪 Test quality analysis by Test Quality Sentinel · haiku45 · 20.2 AIC · ⌖ 5.68 AIC · ⊞ 7.6K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: Test modification approved. 0 new test functions; 4 assertions added for dynamic-key schema coverage. Test inflation ratio 0.33 (acceptable, < 2:1). No violations.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please resolve the blocking review feedback on this PR, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

Branch update was requested automatically for this run.
Run: https://github.com/github/gh-aw/actions/runs/31767348894

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 23.3 AIC · ⌖ 5.78 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please resolve the blocking review feedback on this PR, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (ne...

Resolved in caa3fa4. Field extraction is now limited to the top-level FrontmatterConfig struct, the workflow was recompiled, and the final local validation gate passed.

Copilot AI requested a review from gh-aw-bot August 14, 2026 04:01
@pelikhan
pelikhan merged commit b9821c6 into main Aug 14, 2026
@pelikhan
pelikhan deleted the copilot/deep-report-schema-consistency-tooling branch August 14, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants