Skip to content

feat: add daily schema-sync workflow#2747

Merged
lpcox merged 1 commit intomainfrom
feat/schema-sync-workflow
May 8, 2026
Merged

feat: add daily schema-sync workflow#2747
lpcox merged 1 commit intomainfrom
feat/schema-sync-workflow

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented May 8, 2026

Summary

Adds a daily agentic workflow (schema-sync) that keeps AWF schemas and spec documents in sync with source code changes.

What it does

  1. Monitors commits to source files that drive schema/spec content (src/config-file.ts, src/squid-config.ts, containers/api-proxy/token-tracker.js, etc.)
  2. First run processes the last 7 days of commits; subsequent runs only process commits since the last run (tracked via cache-memory)
  3. Opens a PR if schemas or specs need updating to reflect implementation changes

Files affected

Source files Target documents
src/config-file.ts, src/types.ts, src/cli.ts docs/awf-config.schema.json, docs/awf-config-spec.md
src/squid-config.ts, src/logs/log-parser.ts schemas/audit.schema.json
containers/api-proxy/token-tracker.js schemas/token-usage.schema.json

README update

Added links to schemas/audit.schema.json, schemas/token-usage.schema.json, and schemas/README.md in the "Explore the docs" section.

Add a daily agentic workflow (schema-sync) that monitors commits for
changes to source files that affect AWF schemas and specs, then opens
PRs to keep documentation in sync with implementation.

Uses cache-memory to track the last processed commit SHA so that only
new commits are analyzed on subsequent runs (first run processes the
last 7 days).

Also adds links to audit.schema.json, token-usage.schema.json, and
schemas/README.md in the main README's Explore the docs section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lpcox lpcox requested a review from Mossaka as a code owner May 8, 2026 17:32
Copilot AI review requested due to automatic review settings May 8, 2026 17:32
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Documentation Preview

Documentation build failed for this PR. View logs.

Built from commit d07da2a

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 87.48% 87.55% 📈 +0.07%
Statements 87.44% 87.51% 📈 +0.07%
Functions 82.66% 82.66% ➡️ +0.00%
Branches 79.65% 79.69% 📈 +0.04%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/container-lifecycle.ts 87.1% → 88.2% (+1.14%) 87.5% → 88.6% (+1.11%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🔥 Smoke Test: Copilot BYOK (Offline Mode)

Test Result
GitHub MCP (list PRs)
GitHub.com connectivity
File write/read (smoke-test-copilot-byok-25569930243.txt)
BYOK inference (agent → api-proxy → api.githubcopilot.com)

Running in BYOK offline mode (COPILOT_OFFLINE=true) via api-proxy → api.githubcopilot.com

Overall: PASS — PR by @lpcox, reviewers: @Mossaka @Copilot

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Smoke Test Results

✅ GitHub MCP: Retrieved last 2 merged PRs
✅ Playwright: GitHub page title verified
✅ File Writing: Test file created successfully
✅ Bash Tool: File verification passed

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🤖 Smoke Test Results

Test Status
GitHub MCP connectivity
GitHub.com HTTP connectivity ⚠️ pre-step data unavailable
File write/read ⚠️ pre-step data unavailable

Overall: PARTIAL — MCP connectivity confirmed. Pre-computed step outputs (steps.smoke-data.outputs.*) were not resolved (template variables passed literally), so HTTP and file tests could not be verified.

PR: feat: add daily schema-sync workflow by @lpcox (reviewers: @Mossaka, @Copilot)

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Smoke Codex: FAIL
PRs: fix: scanner workflows now check closed issues with state_reason-aware dedup; fix: remove unused exported interfaces from services and pid-tracker
✅ GitHub PR review
❌ safeinputs-gh PR query
✅ Playwright title check
❌ Tavily web search
✅ File write/read
❌ Discussion query tool; oracle comment posted via fallback
✅ npm ci && npm run build
Overall status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Smoke Test: GitHub Actions Services Connectivity

Check Result
Redis PING ❌ Timeout/no response
PostgreSQL pg_isready ❌ No response
PostgreSQL SELECT 1 ❌ Timeout/no response

Overall: FAILhost.docker.internal services (Redis :6379, PostgreSQL :5432) are not reachable from this environment.

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx All passed ✅ PASS
Node.js execa All passed ✅ PASS
Node.js p-limit All passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for issue #2747 · ● 852.8K ·

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new scheduled agentic workflow to keep published schema/spec documents aligned with implementation changes, and updates the README to surface the schema resources.

Changes:

  • Added a new agentic workflow definition (schema-sync.md) plus its compiled lock workflow (schema-sync.lock.yml) to review relevant source changes and open doc/schema update PRs.
  • Updated README.md to link to the audit/token-usage JSON schemas and the schemas README.
Show a summary per file
File Description
README.md Adds “Explore the docs” links to schema artifacts under schemas/.
.github/workflows/schema-sync.md Defines the new daily schema/spec sync agent workflow (prompt, tool config, safe outputs).
.github/workflows/schema-sync.lock.yml Generated compiled workflow for GitHub Actions execution.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 5

mode: gh-proxy
toolsets: [default, pull_requests]
cache-memory: true
bash: ["*"]
Comment on lines +13 to +20
engine: copilot
strict: true
timeout-minutes: 20
network:
allowed:
- defaults
- node
- github
Comment on lines +54 to +63
### 1. Load last-processed commit

Read `/tmp/gh-aw/cache-memory/schema-sync-state.json`. It stores:
```json
{ "last_commit_sha": "<sha>", "updated": "YYYY-MM-DD-HH-MM-SS" }
```

- If the file exists, use `last_commit_sha` as the starting point.
- If the file does NOT exist (first run), use commits from the **last 7 days**.

Comment on lines +7 to +12
on:
schedule: daily on weekdays
permissions:
contents: read
pull-requests: read
issues: read
create-pull-request:
max: 1
labels: [automation, schemas]
title-prefix: "docs: "
@lpcox lpcox merged commit 875fecb into main May 8, 2026
67 of 70 checks passed
@lpcox lpcox deleted the feat/schema-sync-workflow branch May 8, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants