Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/evidence-freshness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Audit explicit evidence deadlines

on:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1'

permissions:
contents: read

concurrency:
group: evidence-freshness-${{ github.ref }}
cancel-in-progress: true

jobs:
evidence-freshness:
name: Advisory evidence freshness audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22

- name: Install pinned validation dependencies
run: npm ci --ignore-scripts --no-audit --no-fund

- name: Audit declared deadlines and emit annotations
shell: bash
run: |
as_of="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
set +e
node scripts/audit-evidence-freshness.mjs \
--record consumer-reference/baselines/calibration.json \
--as-of "$as_of" \
--mode advisory \
--json > evidence-freshness-report.json
audit_status=$?
set -e
AUDIT_STATUS="$audit_status" node -e '
const fs = require("node:fs");
const report = JSON.parse(fs.readFileSync("evidence-freshness-report.json", "utf8"));
for (const warning of report.warnings ?? []) {
console.log(`::warning file=${warning.source_path}::${warning.code}: ${warning.message}`);
}
const status = Number(process.env.AUDIT_STATUS);
if (status !== 0 || report.ok !== true) process.exit(1);
'

- name: Upload freshness report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: evidence-freshness-${{ github.run_id }}
path: evidence-freshness-report.json
if-no-files-found: error
retention-days: 14
156 changes: 156 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node
Expand All @@ -47,6 +48,7 @@ jobs:
node -c scripts/validate-vocabulary.mjs
node -c scripts/test-validate-vocabulary.mjs
node -c scripts/component-state-workflow-contract.mjs
node -c scripts/consumer-evidence-governance-contract.mjs
node -c scripts/promotion-governance-contract.mjs
node -c scripts/promotion-fixture-inventory.mjs
node -c scripts/promotion-boundary-test-contract.mjs
Expand All @@ -66,6 +68,23 @@ jobs:
node -c scripts/consumer-reference-case-runner.mjs
node -c scripts/validate-promotion-rfc.mjs
node -c scripts/test-validate-promotion-rfc.mjs
node -c scripts/json-schema-formats.mjs
node -c scripts/consumer-conformance-contract.mjs
node -c scripts/validate-consumer-conformance.mjs
node -c scripts/test-validate-consumer-conformance.mjs
node -c consumer-reference/fixtures/consumer-conformance/e2e-fixture.mjs
node -c scripts/page-evidence-contract.mjs
node -c scripts/page-evidence-fixture.mjs
node -c scripts/create-page-evidence-session.mjs
node -c scripts/finalize-page-evidence.mjs
node -c scripts/validate-page-evidence.mjs
node -c scripts/test-validate-page-evidence.mjs
node -c scripts/audit-evidence-freshness.mjs
node -c scripts/test-audit-evidence-freshness.mjs
node -c tests/fixtures/consumer-conformance-scenarios.mjs
node -c tests/helpers/render-consumer-conformance.mjs
node -c tests/consumer-conformance.spec.mjs
node -c scripts/test-consumer-conformance-sentinel.mjs
node -c consumer-reference/adapters/style-dictionary.config.mjs
node -c scripts/reference-token-contract.mjs
node -c scripts/reference-artifact-path-contract.mjs
Expand Down Expand Up @@ -113,6 +132,9 @@ jobs:
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/evidence-record.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/runtime-evidence-manifest.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/promotion-rfc.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/consumer-conformance-record.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/page-evidence-session.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/schema/page-evidence-manifest.schema.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/policies/shared-experimental.json"))'
node -e 'JSON.parse(require("fs").readFileSync("consumer-reference/fixtures/promotion/manifest.json"))'
git diff --check
Expand Down Expand Up @@ -169,6 +191,13 @@ jobs:
node scripts/validate-promotion-rfc.mjs --json
node scripts/test-validate-promotion-rfc.mjs --json

- name: Consumer migration and page-evidence contracts
run: |
node scripts/test-validate-consumer-conformance.mjs --case valid-runtime-proof --json
node scripts/test-validate-consumer-conformance.mjs --json
node scripts/test-validate-page-evidence.mjs --json
node scripts/test-audit-evidence-freshness.mjs --json

- name: Portable token artifact integrity
run: |
node scripts/validate-reference-artifacts.mjs --manifest consumer-reference/generated/manifest.json --json
Expand Down Expand Up @@ -201,6 +230,133 @@ jobs:
- name: Pattern adversarial fixtures
run: node scripts/test-validate-patterns.mjs --json

consumer-conformance:
name: Consumer conformance Chromium matrix
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/playwright:v1.61.0-noble@sha256:57b65fdc9ceabe0ef613124c7bbe2babcf9362c4d85e382fe3b03604e84b428a
options: --platform linux/amd64
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node 22
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22

- name: Install exact conformance dependencies
run: npm ci --ignore-scripts --no-audit --no-fund

- name: Run deterministic browser matrix
run: npx playwright test tests/consumer-conformance.spec.mjs --project=chromium --reporter=line

- name: Run browser matrix semantic negative controls
run: node scripts/test-consumer-conformance-sentinel.mjs --json

consumer-page-evidence:
name: Consumer page-evidence raster capture (nonblocking)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
continue-on-error: true
env:
CONSUMER_CONFORMANCE_CAPTURE_DIR: .tmp/consumer-page-evidence
PAGE_EVIDENCE_ARTIFACT_ROOT: ${{ github.workspace }}/.tmp/consumer-page-evidence-consumer/evidence/session
PAGE_EVIDENCE_CASE_ID: state-w1024-focus
PAGE_EVIDENCE_CONSUMER_ROOT: ${{ github.workspace }}/.tmp/consumer-page-evidence-consumer
PAGE_EVIDENCE_PACKET_DIR: ${{ github.workspace }}/.tmp/consumer-page-evidence-packet
PAGE_EVIDENCE_RECORD: ${{ github.workspace }}/.tmp/consumer-page-evidence-consumer/records/consumer-conformance.json
PAGE_EVIDENCE_RUNNER_RESULT: runner/responsive-layout.json
PAGE_EVIDENCE_SCENARIO_ID: responsive-layout
container:
image: mcr.microsoft.com/playwright:v1.61.0-noble@sha256:57b65fdc9ceabe0ef613124c7bbe2babcf9362c4d85e382fe3b03604e84b428a
options: --platform linux/amd64
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Setup Node 22
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22

- name: Install exact capture dependencies
run: npm ci --ignore-scripts --no-audit --no-fund

- name: Prepare synthetic consumer sources
run: >-
node scripts/run-consumer-page-evidence-ci.mjs prepare
--consumer-root "$PAGE_EVIDENCE_CONSUMER_ROOT"
--record "$PAGE_EVIDENCE_RECORD"
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT"

- name: Create source-bound page-evidence session
run: |
consumer_sha=$(git -C "$PAGE_EVIDENCE_CONSUMER_ROOT" rev-parse HEAD)
env -u GITHUB_REPOSITORY -u GITHUB_HEAD_REF -u GITHUB_REF_NAME \
GITHUB_SHA="$consumer_sha" node scripts/create-page-evidence-session.mjs \
--root "$PAGE_EVIDENCE_CONSUMER_ROOT" \
--record "$PAGE_EVIDENCE_RECORD" \
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT" \
--json

- name: Verify synthetic page-evidence identity
run: >-
node scripts/run-consumer-page-evidence-ci.mjs verify-session
--consumer-root "$PAGE_EVIDENCE_CONSUMER_ROOT"
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT"

- name: Capture the selected consumer conformance raster
run: |
cd "$PAGE_EVIDENCE_CONSUMER_ROOT"
CONSUMER_CONFORMANCE_CAPTURE_DIR= npx playwright test tests/consumer-conformance.spec.mjs --project=chromium --reporter=line --grep "state-w1024-focus"

- name: Finalize the page-evidence session
run: |
review_by=$(node -e 'process.stdout.write(new Date(Date.now() + 14 * 24 * 60 * 60 * 1000).toISOString())')
env -u GITHUB_REPOSITORY -u GITHUB_HEAD_REF -u GITHUB_REF_NAME -u GITHUB_SHA \
node scripts/finalize-page-evidence.mjs \
--root "$PAGE_EVIDENCE_CONSUMER_ROOT" \
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT" \
--runner-result "$PAGE_EVIDENCE_RUNNER_RESULT" \
--review-by "$review_by" \
--json

- name: Validate the completed page-evidence packet
run: |
env -u GITHUB_REPOSITORY -u GITHUB_HEAD_REF -u GITHUB_REF_NAME -u GITHUB_SHA \
node scripts/validate-page-evidence.mjs \
--root "$PAGE_EVIDENCE_CONSUMER_ROOT" \
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT" \
--json

- name: Package only validated page evidence
run: >-
node scripts/run-consumer-page-evidence-ci.mjs package
--consumer-root "$PAGE_EVIDENCE_CONSUMER_ROOT"
--artifact-root "$PAGE_EVIDENCE_ARTIFACT_ROOT"
--output "$PAGE_EVIDENCE_PACKET_DIR"

- name: Upload optional consumer page evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: consumer-page-evidence-${{ github.run_id }}-${{ github.sha }}
path: ${{ env.PAGE_EVIDENCE_PACKET_DIR }}/
if-no-files-found: warn
retention-days: 14

- name: Clean up synthetic consumer
if: always()
run: >-
node scripts/run-consumer-page-evidence-ci.mjs cleanup
--consumer-root "$PAGE_EVIDENCE_CONSUMER_ROOT"

chromium-sentinel:
name: Chromium reference sentinel (nonblocking)
runs-on: ubuntu-24.04
Expand Down
4 changes: 3 additions & 1 deletion DOMAINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This manifest is the source of truth for top-level StyleGallery domains. A domai
| --- | --- | --- |
| Layout | `layout/index.md` | Existing `GUIDE.md`, Layout-specific `guides/*.md`, and `recipes/*.md`; generated `patterns/**/*.md` and `CATALOG.md` remain at current paths. Shared `quality/**/*.md` infrastructure governs every domain without becoming a Layout leaf. |
| Motion | `motion/index.md` | `motion/vocabulary.md`, `motion/review-workflow.md`, `motion/practice-reference.md` |
| Design Engineering | `design-engineering/index.md` | `design-engineering/interface-craft.md`, `design-engineering/reference-profiles/index.md`, `design-engineering/reference-profiles/governed-local/index.md`, `design-engineering/reference-profiles/external-adaptation/index.md` |
| Design Engineering | `design-engineering/index.md` | `design-engineering/interface-craft.md`, `design-engineering/consumer-migration-readiness.md`, `design-engineering/reference-profiles/index.md`, `design-engineering/reference-profiles/governed-local/index.md`, `design-engineering/reference-profiles/external-adaptation/index.md` |
| Platform Guides | `platform-guides/index.md` | `platform-guides/apple-interaction.md` |

## Shared Non-Domain Infrastructure
Expand All @@ -43,6 +43,8 @@ All five new domain leaves are independent method rewrites inspired by [emilkowa
- If recognizable upstream expression is added later, preserve the full upstream MIT notice and record the copied material separately before merge.
- Tracked repository documents must not depend on `.omo/`; stable upstream blob links and tracked repository contracts carry contributor-facing provenance.

`design-engineering/consumer-migration-readiness.md` is the separately declared StyleGallery-local leaf. It uses `provenance_kind: local`, carries no external source fields, and remains experimental. Its presence does not change the external-adaptation inventory or make its consumer-local method universal policy.

## Promotion And Staleness

External adaptations begin `experimental`. Promotion to `stable` requires a demonstrated reader or review task, evidence that the document improves that task, a named review owner, and no unresolved provenance or platform-version debt. Remove or revise a page when its source revision changes materially, a platform claim becomes stale, a local quality gate contradicts it, or a reader test shows the route is misleading.
Expand Down
Loading
Loading