Skip to content

dx: scaffold agent infrastructure, CI hardening, and Turbo tuning#458

Open
d-oit wants to merge 14 commits into
mainfrom
feat/goap-068-dx-scaffolding
Open

dx: scaffold agent infrastructure, CI hardening, and Turbo tuning#458
d-oit wants to merge 14 commits into
mainfrom
feat/goap-068-dx-scaffolding

Conversation

@d-oit

@d-oit d-oit commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Phases 2 and 3 of GOAP plan 068. Closes #444, #445, #446, #447, #448, #449, #450, #451, #452, #453, #454.

This PR resolves all the open DX / agent-infrastructure issues in one batch.

New files

Modified files

Quality

All 290 reader-core + 264 web + 280+ worker tests pass; lint, typecheck, and validate-workflows (actionlint + zizmor) all green. The full quality gate was run locally before opening this PR.

d-oit added 8 commits June 6, 2026 09:57
Convert raw console.* on auth, EPUB load, progress sync, and service
worker registration to logClientEvent with a traceId/spanId, satisfying
the AGENTS.md TIER 1 rule 'emit traceId on every critical UI action'.

Reuses the existing logClientEvent contract (covered by api/sync/conflict
tests) and the createTraceId/createSpanId helpers from @do-epub-studio/shared.

Files: ReaderPage.tsx (annotations fetch, logout), useReaderEpub.ts (EPUB
init, progress load/save), main.tsx (service-worker registration,
background sync).

Ref: plans/066-goap-comprehensive-analysis-2026-06-05.md
Plans 066 (analysis) and 067 (ADR) document the two evidence-backed
gaps surfaced by the latest comprehensive survey: CI tooling exec-bit
fragility and partial client observability. Companion to the fixes in
the prior two commits.

ADR-067 codifies the policy: defensive exec bits on vendored CLI tools,
traceId on every critical UI action, no speculative refactors.
Plan 068 orchestrates resolution of the 15 open issues (#439-#454) and
the codacy-flagged PR #440 via a hybrid+swarm strategy. Phase 0 commits
the in-tree fixes; Phase 1 hardens PR #440 sanitizer; Phases 2-3 fan
out DX scaffolding/hygiene work; Phase 4 synthesizes the ADR and PRs.
Closes #453, #452, #451, #447, #446.

- Add .actrc for local GitHub Actions execution via act
- Add llms.txt and llms-full.txt for LLM agent context injection
- Add commitlint.config.cjs with the repo's conventional-commits enums
- Add @commitlint/cli + @commitlint/config-conventional devDeps and pnpm commitlint script
- Add .gitleaks.toml with repo-specific allowlist (false-positive safe)
- Add .yamllint.yml configured for GitHub Actions quirks (on:, long lines)
- Extend .pre-commit-config.yaml with gitleaks + yamllint hooks (pinned SHAs)

The pre-commit-msg hook is preserved as a fast first-line check; commitlint
is the canonical second-line check.

All changes verified by the full quality gate.
Closes #450, #449, #448, #444.

- Add .github/labeler.yml with path-based rules for ci/security/area:*
- Add labeler job to ci.yml (SHA-pinned v2.2.0)
- Add .github/PR_VERIFICATION_CHECKLIST.md and PR_VERIFICATION_GUIDE.md
- Extend PULL_REQUEST_TEMPLATE.md with AI-Agent Verification and
  Accessibility Impact sections
- Add .github/actions/setup-baseline composite action (extracted from
  the inline ci.yml baseline block) and wire it into the build job
- Add actions/labeler and dorny/paths-filter to validate-shas.sh allowlist
- Update package.json with @commitlint devDeps and pnpm commitlint script

The setup-baseline action reuses the main checkout's pnpm store
(--prefer-offline) so the baseline install is much faster than the
inline block it replaced.
… guard

Closes #454, #445.

- Add .gemini/, .jules/, .windsurf/ provider config dirs (intentionally
  thin; each contains a README pointing back to AGENTS.md)
- Add root CLAUDE.md and GEMINI.md as thin adapter files
- Add scripts/check-agent-sync.mjs to enforce the thin-adapter contract:
    * AGENTS.md LOC guard (200-line cap)
    * Per-adapter LOC guard (80-line soft cap)
    * Forbidden heading detection (no adapter may contain AGENTS.md TIER
      headings verbatim)
    * Verbatim block detection (no adapter may copy AGENTS.md intro)
    * Required AGENTS.md reference (every adapter must point back)
- Wire the script into the quality gate
- Reference llms.txt and the per-model dirs in AGENTS.md

This satisfies the goap-068 swarm plan and prevents the per-model
adapters from drifting into copies of AGENTS.md (issue #445 acceptance
criteria).
Closes #443.

- Remove ANALYZE from build.env; build:analyze keeps it. Prevents the
  build:analyze run from busting the regular build cache.
- Add test:coverage as a proper cacheable Turbo task (env: NODE_OPTIONS)
  with the same inputs as test:unit.
- Remove eslint.config.js and vitest.workspace.ts from globalDependencies
  (now in per-task inputs only) to reduce unrelated cache invalidation.
- Add a 'Turbo remote cache status' step to the setup job that emits
  the cache HIT/MISS for the build task via a dry-run JSON parse.

turbo.json doc-comment added explaining the intent of the
globalDependencies scope (pnpm-lock.yaml kept for safety; the rest
moved to per-task inputs).
@codacy-production

codacy-production Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Not up to standards ⛔

🔴 Issues 2 high

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Security 2 high

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 8, 2026

Copy link
Copy Markdown

Deploying do-epub-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6e461ac
Status: ✅  Deploy successful!
Preview URL: https://e73e43e6.do-epub-studio.pages.dev
Branch Preview URL: https://feat-goap-068-dx-scaffolding.do-epub-studio.pages.dev

View logs

@github-actions github-actions Bot added area:build area:reader area:web ci deps Dependency updates documentation Improvements or additions to documentation security agents labels Jun 8, 2026
d-oit added 2 commits June 8, 2026 18:21
The dorny/paths-filter step outputs were not propagating to
downstream job if conditions, causing Build/E2E/Bench to be
skipped. The changes job is kept for informational use (CodeQL,
Labeler, Turbo cache debug) but no longer gates heavy jobs.
All jobs now run on every PR as before.
@d-oit d-oit force-pushed the feat/goap-068-dx-scaffolding branch from b481297 to e377fca Compare June 8, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents area:build area:reader area:web ci deps Dependency updates documentation Improvements or additions to documentation security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: split build job baseline clone into a reusable composite action to reduce duplication and runtime

1 participant