@1aboveio/skills 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/.codex-plugin/resources.json +136 -134
  3. package/package.json +4 -4
  4. package/skills/app-dev/airflow/SKILL.md +1 -1
  5. package/skills/app-dev/android-development/SKILL.md +1 -1
  6. package/skills/app-dev/app-debug/SKILL.md +1 -1
  7. package/skills/app-dev/better-auth/SKILL.md +1 -1
  8. package/skills/app-dev/data-catalog/SKILL.md +1 -1
  9. package/skills/app-dev/data-quality/SKILL.md +1 -1
  10. package/skills/app-dev/ios-foundation/SKILL.md +1 -1
  11. package/skills/app-dev/maestro/SKILL.md +1 -1
  12. package/skills/app-dev/monorepo/SKILL.md +1 -1
  13. package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
  14. package/skills/app-dev/prisma-setup/SKILL.md +1 -1
  15. package/skills/app-dev/pyspark/SKILL.md +1 -1
  16. package/skills/app-dev/python-backend/SKILL.md +1 -1
  17. package/skills/app-dev/shadcn/SKILL.md +1 -1
  18. package/skills/app-dev/zod-v4/SKILL.md +1 -1
  19. package/skills/cicd/cloud-build/SKILL.md +1 -1
  20. package/skills/cicd/cloud-debug/SKILL.md +1 -1
  21. package/skills/cicd/cloud-deploy/SKILL.md +1 -1
  22. package/skills/cicd/docker/SKILL.md +1 -1
  23. package/skills/cicd/github-actions/SKILL.md +31 -12
  24. package/skills/cicd/github-actions/references/audit-and-cleanup.md +121 -0
  25. package/skills/cicd/github-actions/references/audit-profile-optimize.md +4 -1
  26. package/skills/cicd/github-actions/references/pipeline.md +6 -4
  27. package/skills/cicd/github-actions/references/postgres-workflows.md +72 -0
  28. package/skills/cicd/github-actions/references/runners.md +23 -50
  29. package/skills/cicd/github-actions/references/speed-and-audit.md +27 -18
  30. package/skills/cicd/github-flow/SKILL.md +1 -1
  31. package/skills/cicd/google-cloud/SKILL.md +1 -1
  32. package/skills/cicd/mergify/SKILL.md +1 -1
  33. package/skills/cicd/podman/SKILL.md +1 -1
  34. package/skills/content/article-review/SKILL.md +1 -1
  35. package/skills/content/article-to-image/SKILL.md +1 -1
  36. package/skills/content/flowchart-svg/SKILL.md +1 -1
  37. package/skills/content/image-gen/SKILL.md +1 -1
  38. package/skills/content/mermaid/SKILL.md +1 -1
  39. package/skills/content/wechat-article-writer/SKILL.md +1 -1
  40. package/skills/content/wechat-publisher/SKILL.md +1 -1
  41. package/skills/content/wechat-search/SKILL.md +1 -1
  42. package/skills/content/xai-search/SKILL.md +1 -1
  43. package/skills/core/distill-writing/SKILL.md +1 -1
  44. package/skills/core/doc-to-md/SKILL.md +1 -1
  45. package/skills/core/editorial-review/SKILL.md +1 -1
  46. package/skills/core/house-style/SKILL.md +1 -1
  47. package/skills/core/plain-language/SKILL.md +1 -1
  48. package/skills/core/polish-cn/SKILL.md +1 -1
  49. package/skills/core/reg-parser/SKILL.md +1 -1
  50. package/skills/core/terminology/SKILL.md +1 -1
  51. package/skills/core/write-doc/SKILL.md +1 -1
  52. package/skills/core/write-report/SKILL.md +1 -1
  53. package/skills/engineering/better-review/SKILL.md +1 -1
  54. package/skills/engineering/e2e-test/SKILL.md +1 -1
  55. package/skills/engineering/engineering/SKILL.md +1 -1
  56. package/skills/engineering/engineering-runtime/SKILL.md +1 -1
  57. package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
  58. package/skills/engineering/ensure-coverage/SKILL.md +1 -1
  59. package/skills/engineering/golden-path/SKILL.md +1 -1
  60. package/skills/engineering/harness-runtime/SKILL.md +1 -1
  61. package/skills/engineering/resolve-issues/SKILL.md +1 -1
  62. package/skills/engineering/resolve-release/SKILL.md +1 -1
  63. package/skills/engineering/rush-issues/SKILL.md +1 -1
  64. package/skills/engineering/rush-release/SKILL.md +1 -1
  65. package/skills/engineering/test-quality/SKILL.md +1 -1
  66. package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
  67. package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
  68. package/skills/risk-compliance/contract-review/SKILL.md +1 -1
  69. package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
  70. package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
  71. package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
  72. package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
  73. package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
  74. package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1aboveio/skills",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "Every 1aboveio skill package in one: install once, then choose which packages Pi loads with npx @1aboveio/skills select.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,8 +28,8 @@
28
28
  "nativeCodex": {
29
29
  "schemaVersion": 1,
30
30
  "metadataPath": ".codex-plugin/resources.json",
31
- "metadataDigest": "c66494a1f34a7c9ba59dcbc9663b8f84dce29329ec8cc3d7a55febcc5e48cc41",
32
- "releaseIdentity": "eb7d7abc52517d11b09ca4c5baf01cf70b2934441ff046b0f46f5ffd9f122da4"
31
+ "metadataDigest": "3bd45ac351d742b126256708be5228e6cdfac325695421c31666f09ba2683030",
32
+ "releaseIdentity": "8ba69861109e7a54d91e927fe983d23c055fb25f4addc91a680ab4133bc6fee7"
33
33
  },
34
34
  "pi": {
35
35
  "skills": [
@@ -261,7 +261,7 @@
261
261
  ]
262
262
  }
263
263
  ],
264
- "digest": "8cb4859ad50a2e0cfb9b4bdfac53a810dd8f8a4a9ce972befa99151236c25b67"
264
+ "digest": "b9448b7cf51dbb3398ee7e10b4c6edf370fc41a56becc2f66822f384d6ed781d"
265
265
  },
266
266
  "publishConfig": {
267
267
  "registry": "https://registry.npmjs.org/",
@@ -2,7 +2,7 @@
2
2
  name: airflow
3
3
  description: Airflow DAG architecture and conventions. Use when designing, writing, reviewing, testing, or debugging Airflow DAGs and tasks, including TaskGroups, data intervals, timezone-aware date parameters, CLI validation, environment-based scheduling, and pytest integrity tests.
4
4
  user-invocable: true
5
- release-version: 0.50.6
5
+ release-version: 0.50.8
6
6
  ---
7
7
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
8
8
  # Airflow DAG Development Patterns
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: android-development
3
3
  description: "Prove and debug Expo / React Native apps on an owned Android emulator. Use for Android startup/rendering failures, Metro or ADB problems, native harness failures, APK builds, SDK/NDK/JDK workspace setup, native journey validation, and choosing Kotlin/Compose versus React Native for Android flows. Reproduce failed Android CI checkpoints off CI before fixing and redispatching. Standalone invocation offers Project or Session; init persists repo conventions. Maestro journey authoring, UI-driver migration and flow diagnosis belong to maestro. NOT for workflow YAML, CI speed or runners (github-actions), browser tests (e2e-test), iOS (ios-foundation), plain Jest tests, or signing/store release."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Android development
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: app-debug
3
3
  description: "Diagnose runtime failures in deployed Cloud Run services — 5xx/422 errors, tracebacks, Next.js SSR/hydration or Server Action failures, DB/Secret Manager connection errors, cold-start timeouts, container OOM. NOT for build or deploy failures (cloud-debug)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # App Debug
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: better-auth
3
3
  description: "Add or debug Better Auth for Next.js App Router: login, sessions, protected routes, middleware, OAuth (including Feishu/Lark), cookies, Prisma, and Auth.js migration."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Better Auth for Next.js
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: data-catalog
3
3
  description: "Column definitions for warehouse tables, written inside the Spark/PySpark or SQL script that builds each table (CATALOG_TABLE / CATALOG_FIELDS, or a `-- @field` comment block), with a generated markdown catalog in docs/catalog/ and a CI check that fails a PR whose catalog is stale. Use when writing or changing a table script that adds, renames, removes, or changes the meaning of an output column or feature; when asked what a warehouse column or feature means; to set a repo up ('init the data catalog', 'generate the data dictionary', '字段字典', 'add catalog CI'); or to audit existing SQL or Spark scripts for undocumented columns. NOT for implementing or tuning the Spark job itself (pyspark), DAG wiring (airflow), or general workflow YAML (github-actions)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Data catalog
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: data-quality
3
3
  description: "Check a published warehouse table's data against its data-catalog definitions with read-only SELECTs: columns never filled or stuck at one value, counts below zero, ratios outside 0–1, declared values that never appear and undeclared values that do. Then classify each finding as a wrong definition, wrong code, or wrong data. Use when asked whether a table's data is right, to profile or sanity-check a dwd/ads table, to find dead or constant columns, to check a column's values against its documented list, after a pipeline change ships, or when a data-catalog definition and the data might disagree. NOT for validating a Spark change before it ships (pyspark canary and reconciliation), writing definitions (data-catalog), or monitoring dashboards."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Data quality
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ios-foundation
3
3
  description: "Set up and prove an Expo / React Native native iOS workspace from an assigned or fresh isolated workspace to a manual Login smoke on an owned iOS Simulator: isolated workspace and private caches, Xcode/runtime/CocoaPods preflight, frozen install with `pod install --deployment`, platform-scoped prebuild, an ad-hoc-signed Debug simulator build, a private simulator by exact UDID, Metro on a free port, a disposable PostgreSQL backend with owned cleanup, and the evidence record (setup proof only; feature work reports the smoke result). Use for 'set up iOS', 'build the iOS app', 'run the app on the iOS simulator', 'add iOS to the React Native app', 'prove the iOS build', or when a pod install, xcodebuild, simulator boot, Metro connection or Keychain session fails. NOT for Android (android-development), signing, TestFlight or App Store release, or general workflow YAML (github-actions)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # iOS foundation
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro
3
3
  description: "Design, run, debug and migrate mobile E2E journeys with Maestro: complete flows and subflows, selectors, parameters, exclusive UI-driver ownership, non-UI authentication/backend helpers and failure evidence. Use for Maestro YAML/CLI/MCP work, slow fragmented mobile journeys, UiAutomation driver collisions, or replacing a hybrid Python/uiautomator2 UI harness. Android-first; use platform-neutral flow guidance for iOS only with its verified device/runtime contract. NOT for Android provisioning/builds (android-development), iOS setup (ios-foundation), browser Playwright tests (e2e-test), or CI workflow YAML (github-actions)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Maestro
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: monorepo
3
3
  description: Turborepo architecture for shared packages, pnpm workspaces, DAL boundaries, and pipelines.
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Turborepo Monorepo Architecture
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: nextjs-fullstack
3
3
  description: "Build or debug Next.js App Router features with React 19 — pages/layouts/route handlers, Server/Client Components, Server Actions, forms, middleware, DAL, strict TypeScript, Zod — plus our conventions: nuqs URL state, SWR cache, Skeleton/Progress + Sonner feedback, drag-and-drop upload, the portal app shell, list pages as filter/sort/paginate tables. shadcn component mechanics: see the shadcn skill."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Next.js 16 Fullstack Development
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: prisma-setup
3
3
  description: Use when adding or debugging Prisma with PostgreSQL, Next.js, or Turborepo, including schema.prisma, prisma.config.ts, client generation, migrations, seeds, relations, adapters, and DAL/database-layer setup. Triggers on phrases like "Prisma schema", "prisma migrate", "schema.prisma", "seed the database", "PrismaClient error", "relation issue", or "database layer".
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Prisma v7 Setup Guide
@@ -12,7 +12,7 @@ description: >
12
12
  Connect, spark-submit, Hudi commits, backfills, validate-only canaries,
13
13
  cluster reconciliation, or Spark event-log profiling — including warehouse
14
14
  job timeouts, empty Hudi writes, or EMR/Dataproc performance regressions.
15
- release-version: 0.50.6
15
+ release-version: 0.50.8
16
16
  ---
17
17
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
18
18
  # PySpark
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: python-backend
3
3
  description: "Python backend architecture for FastAPI, Tortoise ORM, Pydantic Settings, loguru, and uv. Also: uv.lock installs in CI/Docker via a proxy or mirror (`uv sync --frozen` bypasses it), slow uv installs on runners, relocking."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Python Backend Conventions
@@ -2,7 +2,7 @@
2
2
  name: shadcn
3
3
  description: "Add or debug shadcn/ui in a React/Next.js project: components.json, shadcn init/add, presets, registries, Tailwind styling, base/radix/aria composition, component fixes, and list-index pages — where the default is the DiceUI data table with filter/sort/pagination in the URL via nuqs, not a bare shadcn Table."
4
4
  allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
5
- release-version: 0.50.6
5
+ release-version: 0.50.8
6
6
  ---
7
7
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
8
8
  # shadcn/ui
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: zod-v4
3
3
  description: Zod v4 schema conventions and v3 migration for errors, validators, objects, enums, records, and async parsing.
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Zod v3 to v4 Migration
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: cloud-build
3
3
  description: "Build or debug Cloud Build pipelines for Cloud Run: cloudbuild.yaml, triggers, Artifact Registry, builds, migrations, deploys, secrets, VPC, notifications. Use cloud-deploy for staged promotion. NOT for GitHub Actions PR checks (github-actions)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Cloud Build Direct Deploy to Cloud Run
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: cloud-debug
3
3
  description: "Debug Cloud Build or Deploy failures: builds, deployments, health checks, and pipeline errors. Inputs: service, build ID, region. NOT for GitHub Actions runs (github-actions) or runtime errors in a running service (app-debug)."
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Cloud Build & Cloud Deploy Debug Skill
@@ -5,7 +5,7 @@ description: >
5
5
  CI/CD pipelines with staged promotion, verification gates, or GitFlow branching.
6
6
  Also use when debugging Cloud Deploy pipeline failures. NOT for simple single-container
7
7
  deploys — use cloud-build instead.
8
- release-version: 0.50.6
8
+ release-version: 0.50.8
9
9
  ---
10
10
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
11
11
  # Cloud Deploy + Skaffold + Kustomize for Cloud Run
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: docker
3
3
  description: Docker/Podman container architecture and build patterns. Read when designing or reviewing containerization, Dockerfile structure, multi-stage builds, PyPI mirror support, or docker-compose setup for Python/uv projects, and when a Dockerfile's dependency install misses the layer cache on every build (build args such as a commit SHA or version declared too early) or an image build is slow in CI.
4
- release-version: 0.50.6
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Docker Build Patterns
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: github-actions
3
- description: "Author, review, audit, profile, optimize, or debug GitHub Actions workflows (.github/workflows/*.yml): run-history audits, job and step timing, resource bottlenecks, before/after comparisons, conditional CI by changed path, the one required gate check, PR and merge-queue lanes, sharding, workers, caching, self-hosted runners, timeouts, concurrency, permissions and action pinning, post-deploy verification, npm publishing. Use for 'set up CI', 'CI is slow', 'profile CI', 'optimize our pipeline', 'audit CI for redundant or wasted jobs', 'why is this check stuck expected or never started', 'harden this workflow', or 'browser not found on the runner'. NOT for pushing, opening, or merging a PR, or writing CI conventions into CONTRIBUTING.md (github-flow), queue rules or a check unmet inside Mergify (mergify), Playwright config and specs (e2e-test), cloudbuild.yaml or Cloud Run deploys (cloud-build), or which gates a repo must prove (ensure-coverage)."
4
- release-version: 0.50.6
3
+ description: "Author, review, audit, profile, optimize, or debug GitHub Actions workflows (.github/workflows/*.yml): run-history audits, CI cleanup to get each job below five minutes, job and step timing, resource bottlenecks, before/after comparisons, conditional CI by changed path, the one required gate check, PR and merge-queue lanes, sharding, workers, caching, self-hosted runners, timeouts, concurrency, permissions and action pinning, post-deploy verification, npm publishing. Use for 'set up CI', 'CI is slow', 'profile CI', 'optimize our pipeline', 'audit CI for redundant or wasted jobs', 'why is this check stuck expected or never started', 'harden this workflow', or 'browser not found on the runner'. NOT for pushing, opening, or merging a PR, or writing CI conventions into CONTRIBUTING.md (github-flow), queue rules or a check unmet inside Mergify (mergify), Playwright config and specs (e2e-test), cloudbuild.yaml or Cloud Run deploys (cloud-build), or which gates a repo must prove (ensure-coverage)."
4
+ release-version: 0.50.8
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # GitHub Actions
@@ -10,6 +10,10 @@ GitHub Actions verifies; Cloud Build builds and deploys. No workflow deploys to
10
10
 
11
11
  ## Workflow
12
12
 
13
+ For pipeline audits and cleanup, read [audit checklist and cleanup method](references/audit-and-cleanup.md).
14
+ It covers the whole skill, cgroup awareness, and the `test-quality` handoff for test cleanup.
15
+ The target is every job under five minutes, including setup and teardown; report exceptions.
16
+
13
17
  For an existing pipeline, use **inspect -> fix -> verify**:
14
18
  [inspect-fix-verify guidance](references/audit-profile-optimize.md). Inspect only enough
15
19
  source and representative runs to choose an optimization, implement it for fix/optimize
@@ -66,11 +70,16 @@ replacement of an established pipeline during an audit or performance-only chang
66
70
  - Keep one type-check gate and one lint gate; turn off the type check and lint inside
67
71
  framework builds in other jobs.
68
72
  - Shard E2E.
69
- - Bound test workers by the slot quota, memory and fixture isolation. Set the count
70
- explicitly and measure; never auto-detect host cores inside a container.
71
- - Parallelize unit tests across cores.
72
- - Put disposable Postgres on a size-bounded tmpfs by default. Disable durability only
73
- when measured and the tests do not require persistence/recovery semantics.
73
+ - **Cgroup awareness:** derive test/build workers, within-job parallelism and Node heap
74
+ limits from effective CPU and memory ceilings. Share the budget across concurrent
75
+ processes and reserve non-heap memory. Read [resource sizing](references/audit-and-cleanup.md#cgroup-awareness).
76
+ - For expensive test cleanup, load `test-quality` and follow its audit → fix → verify
77
+ method; CI owns worker counts and sharding.
78
+ - Configure self-hosted PostgreSQL jobs with infra's slot-pod helper: start, verify,
79
+ run consumers, then always-cleanup. Use the [PostgreSQL workflow templates](references/postgres-workflows.md).
80
+ Infra owns pod, network and cgroup setup; workflows consume its provided interface.
81
+ - Prefer size-bounded tmpfs within the supported storage contract. Disable durability
82
+ only when measured and the tests do not require persistence/recovery semantics.
74
83
  - Screenshot and trace only failed tests.
75
84
  - Give every job `timeout-minutes`; it is the only hang limit, since the queue sets none.
76
85
 
@@ -79,9 +88,15 @@ replacement of an established pipeline during an audit or performance-only chang
79
88
  - Load the pnpm lockfile once, at admission. Skip the re-load in the queue only with a repo
80
89
  command for it, and never when the batch changed `pnpm-lock.yaml`.
81
90
 
82
- **SLA** (excluding E2E)
83
- - Mergify: PR admission < 2 min; merge queue < 5 min.
84
- - Without Mergify: total PR CI < 7 min.
91
+ **Performance target**
92
+ - Every job, including E2E and builds: < 5 min from job start through teardown.
93
+ - Full workflow run: ≤ 20 min; for merge-queue workflows, admission ≤ 5 min and
94
+ queue validation ≤ 15 min. Include E2E, builds, scheduling and dependency waits,
95
+ setup and teardown. These limits are inclusive; the per-job target stays < 5 min.
96
+ - Measure from run creation to completion, not by summing parallel job durations.
97
+ Break out scheduling wait and execution to locate the cause of a breach.
98
+ - Use the [cleanup method](references/audit-and-cleanup.md#cleanup-method) for over-budget jobs;
99
+ preserve validation and report any unmet target.
85
100
 
86
101
  **Security**
87
102
  - Set `permissions: contents: read` at the top.
@@ -102,16 +117,20 @@ replacement of an established pipeline during an audit or performance-only chang
102
117
 
103
118
  | Read | When |
104
119
  |---|---|
120
+ | [audit-and-cleanup.md](references/audit-and-cleanup.md) | Overall audit checklist, sub-five-minute jobs, cgroup sizing, test cleanup handoff |
105
121
  | [audit-profile-optimize.md](references/audit-profile-optimize.md) | Profile the bottleneck, optimize its execution path, verify; expand only as needed |
106
122
  | [ci-case-studies.md](references/ci-case-studies.md) | Anonymized CI improvements, measured results, failed experiments and evidence caveats |
107
123
  | [conditional-ci.md](references/conditional-ci.md) | Template; path, event, or queue conditions |
108
124
  | [pipeline.md](references/pipeline.md) | Lanes, merge queue options, the required check, workflow layout |
109
125
  | [speed-and-audit.md](references/speed-and-audit.md) | CI audit, caching, timeouts, concurrency, workers, Postgres |
110
- | [runners.md](references/runners.md) | Self-hosted fleet |
126
+ | [runners.md](references/runners.md) | Self-hosted job placement and integration constraints |
127
+ | [postgres-workflows.md](references/postgres-workflows.md) | PostgreSQL workflow configuration and templates for self-hosted and GitHub-hosted jobs |
111
128
  | [security.md](references/security.md) | Hardening a workflow |
112
129
  | [post-deploy-and-publishing.md](references/post-deploy-and-publishing.md) | Post-deploy verification, npm publishing |
113
130
  | [debugging.md](references/debugging.md) | Failed run, missing check, stuck job |
114
131
 
115
- **Hand-offs:** what to prove → `ensure-coverage`; Playwright → `e2e-test`; build and deploy →
132
+ **Hand-offs:** test cleanup → `test-quality` (optional integration; load it before changing
133
+ tests; if unavailable, report that part blocked and continue independent CI cleanup);
134
+ what to prove → `ensure-coverage`; Playwright → `e2e-test`; build and deploy →
116
135
  `cloud-build` / `cloud-deploy`; queue config and a stuck queued PR → `mergify`; push, PR,
117
136
  merge, and CI conventions in `CONTRIBUTING.md` → `github-flow`.
@@ -0,0 +1,121 @@
1
+ # CI audit and cleanup
2
+
3
+ Read for a pipeline audit, CI cleanup, or a request to get jobs below five minutes.
4
+ Use the checklist across the requested pipeline for an audit; for a focused fix, inspect
5
+ only applicable areas. Read-only audits report findings. Cleanup requests implement and
6
+ verify the justified changes within scope.
7
+
8
+ ## Audit checklist
9
+
10
+ For each applicable item, distinguish verified, finding, unknown, and not applicable.
11
+ Attach the job or file and evidence to findings; unknown means evidence is missing.
12
+ The run-history CLI supplies timing and redundancy leads, not a resource or security audit.
13
+ A compact response is sufficient; a report file is optional.
14
+
15
+ - [ ] **Selection:** changed paths select their consumers; shared inputs fan out;
16
+ unknown paths receive sufficient validation; skips are intentional and visible.
17
+ - [ ] **Gates and queues:** reducers preserve failures and missing results; required
18
+ names match protection; queue trees validate; repeated checks have a concrete purpose.
19
+ - [ ] **Job structure:** dependencies express actual prerequisites; independent work
20
+ runs concurrently; compatible checks share setup; downstream jobs reuse one build.
21
+ - [ ] **Cgroup awareness:** workers, build parallelism and heap limits follow effective
22
+ CPU and memory ceilings; concurrent commands share that budget; child containers have
23
+ explicit limits. Apply [resource sizing](#cgroup-awareness).
24
+ - [ ] **Runner ownership:** labels exist; fork guards precede allocation; workspace
25
+ cleanup is scoped; ports, files and services are private to the job.
26
+ - [ ] **PostgreSQL job configuration:** self-hosted jobs use infra's slot-pod helper
27
+ with start/verify/always-cleanup, consistent job/matrix names and the supplied endpoint.
28
+ Database and test workers share the job resource budget. Flag self-hosted `services:`
29
+ or standalone database containers; route missing infra interfaces to infra. See the
30
+ [workflow templates](postgres-workflows.md).
31
+ - [ ] **Installs and caches:** installs preserve lockfile integrity; cache keys cover
32
+ inputs; cache transfer saves time; fleet proxies are inherited; images match consumers.
33
+ - [ ] **Timeouts and teardown:** job and inner command limits leave cleanup time;
34
+ cancellation removes owned containers and child processes; temporary resources expire.
35
+ - [ ] **Security:** permissions are minimal; third-party actions are pinned; untrusted
36
+ expressions pass through environment variables; secrets stay out of logs and artifacts.
37
+ - [ ] **Failure evidence:** useful logs and failure artifacts survive; retries are
38
+ visible; reporting cannot hide producer failures; scheduled failures alert an owner.
39
+ - [ ] **Test quality:** expensive tests prove distinct behavior; repeated setup, sleeps,
40
+ redundant matrices and weak assertions are assessed through `test-quality`.
41
+ - [ ] **Performance:** every job completes in **under five minutes**, including setup,
42
+ execution, artifact handling and teardown. Measure execution from job start to finish;
43
+ report runner queue wait separately. Identify missing timings and every over-budget job.
44
+ - [ ] **Run latency:** full workflow run ≤ 20 minutes; for merge-queue workflows,
45
+ admission ≤ 5 minutes and queue validation ≤ 15 minutes. Include E2E and builds.
46
+ Measure run creation through completion, including scheduling, dependency waits,
47
+ setup, execution, artifact handling and teardown. Apply the lane-specific limit
48
+ when relevant; equality meets the run limit. Report missing timing as unknown.
49
+ Do not sum parallel job times or omit trailing reporting jobs. Distinguish this
50
+ workflow duration from time spent waiting for admission to the merge queue.
51
+
52
+ ## Cgroup awareness
53
+
54
+ Read limits where the workload executes, including inside a job-started container.
55
+ Resolve the process's cgroup and visible ancestor limits: on v2 use `cpu.max`,
56
+ `cpuset.cpus.effective` and `memory.max`; support the corresponding v1 quota, cpuset
57
+ and memory controls where needed. Combine finite quota/period limits with CPU affinity
58
+ and cpusets, taking the tightest applicable limits. Treat `max` and v1 unlimited memory
59
+ sentinels as unlimited, not numbers to allocate. For unavailable controls or non-Linux
60
+ runners, use a documented bounded runner allocation and log the fallback; host CPU count
61
+ alone does not establish a container's allowance.
62
+
63
+ Derive positive worker counts from the CPU budget, with a minimum of one for fractional
64
+ quotas; reduce for measured memory use or fixture isolation. Pass the computed count to
65
+ Playwright, Vitest, pytest, Node test concurrency and framework build workers instead of
66
+ hard-coding a fleet count or relying on host-core defaults. Increase parallelism within
67
+ the job while resources permit. Divide the budget among simultaneous commands and nested
68
+ worker pools; preserve every command's exit status and isolate mutable fixtures.
69
+
70
+ For a build running alone, derive `--max-old-space-size` in MiB from the effective memory
71
+ ceiling, reserving space for young-generation memory, native allocations, buffers and
72
+ build subprocesses. Old space is not total process memory: use most of the allocation
73
+ when measurements support it, rather than assigning 100% blindly. Scope the setting to
74
+ the build command; inherited `NODE_OPTIONS` can give each child the same heap allowance.
75
+ Log the detected ceilings, chosen workers and heap, and check throttling and peak memory
76
+ when tuning. A job-started sibling container using the host Docker/Podman API does not
77
+ inherit the runner container's limits: pass CPU and memory caps within the assigned
78
+ runner budget, then derive its worker counts inside that container.
79
+
80
+ ## Cleanup method
81
+
82
+ 1. **Measure the jobs.** Profile a representative successful run with
83
+ `scripts/ci-run-audit.mjs --repo <owner/repo> --profile-run <id> --json`.
84
+ List each job's elapsed time and dominant phases, plus full run duration and its
85
+ applicable overall/admission/queue limit. Trace run-level breaches through the
86
+ critical path, scheduling and dependencies even when every job is under five minutes.
87
+ Use history only to resolve a concrete redundancy or variability question.
88
+ Preserve existing gate names and meaning.
89
+ 2. **Remove repeated work.** Select only relevant jobs; consolidate compatible short
90
+ checks; keep one qualifying type check and lint; build once for consumers. Remove
91
+ repeated installs, schema preparation and cache transfers when the evidence supports
92
+ it. Keep changed merge-queue trees validated and legitimate scheduled checks intact.
93
+ 3. **Clean expensive tests through `test-quality`.** When tests dominate, load the
94
+ installed `test-quality` skill and follow its audit → fix → verify method and its
95
+ “When the goal is speed” guidance. Pass the slow suites, per-file/test timings,
96
+ existing behavior requirements and the execution budget remaining after job overhead.
97
+ Fix repeated fixture/subprocess setup first. Before deleting a redundant test, read
98
+ its named twin, confirm the same branch/input condition and equally strong assertions,
99
+ and find references to its name. Preserve distinct paths, review deletions freshly,
100
+ and run affected tests with real dependencies. An audit-only request stops at findings.
101
+ This integration is optional for CI work without test changes; if `test-quality` is
102
+ unavailable, continue independent workflow cleanup and report test cleanup blocked.
103
+ 4. **Use the allocation.** Apply cgroup awareness to worker pools, framework builds and
104
+ independent commands. Then balance shards by measured duration when a suite still
105
+ exceeds its budget. Include repeated setup and shared runner capacity in the tradeoff;
106
+ moving time into queue waits or adding shards without a measured benefit is not done.
107
+ 5. **Verify the result.** Run affected script checks and `actionlint` for workflow edits;
108
+ use `test-quality` verification for test changes. Compare the changed phases and each
109
+ job's full elapsed time and full run duration on a comparable runner and cache state.
110
+ Check both job and run limits: faster jobs can still leave a slow dependency chain.
111
+ Preserve all qualifying behavior and report any moved bottleneck or increased
112
+ runner consumption.
113
+
114
+ Completion means every in-scope job is measured below five minutes and each full run
115
+ meets its applicable limit (≤ 20 minutes overall, ≤ 5 minutes for merge-queue admission,
116
+ ≤ 15 minutes for queue validation), with validation preserved. A five-minute timeout
117
+ is not evidence of success. Keep timeouts above measured execution with cleanup headroom;
118
+ do not skip tests, mask failures or rename/split a job solely to hide its cost. If a job
119
+ or run remains over budget, identify its dominant cause and next bounded action.
120
+ Report unmeasured changes as unverified and any necessary exception
121
+ as requiring agreement; do not claim the target is met or silently exempt E2E/build jobs.
@@ -1,5 +1,8 @@
1
1
  # Inspect, fix, verify
2
2
 
3
+ For an overall pipeline audit or cleanup, first read the
4
+ [audit checklist and cleanup method](audit-and-cleanup.md): every job targets under
5
+ five minutes, including setup and teardown, with test cleanup handed to `test-quality`.
3
6
  Use this loop for an existing pipeline. Optimization is the default focus: reduce
4
7
  required-check latency or runner consumption while preserving validation, not fix every
5
8
  red job or produce an investigation report. For fix/optimize requests, carry through
@@ -113,7 +116,7 @@ investigation. No justified change remains a valid outcome.
113
116
  | Repeated or unreliable dependency work | local download store, working gateway, bounded downloads | frozen/hash-verified installs; no credentials in logs |
114
117
  | Ineffective cache | remove expensive transfer or cache downloads only | compare transfer cost with install/build savings |
115
118
  | CPU oversubscription | quota-sized workers and balanced shards | check memory, throttling, and fixture isolation; do not copy fleet worker counts |
116
- | Scratch DB disk cost | size-bounded tmpfs (default); optional durability reduction | measure benefit; never weaken persistence/recovery tests; respect memory budget |
119
+ | Scratch DB disk cost | size-bounded tmpfs when the supported helper/storage contract permits; optional durability reduction | self-hosted PostgreSQL stays in the slot pod through the job-owned helper; measure benefit, preserve persistence/recovery tests and shared memory limits |
117
120
  | Slow test-DB preparation | one session for the prepare scripts, parallel independent ones, or a snapshot keyed on schema+prepare inputs | tmpfs alone does not fix round-trip-bound SQL; the snapshot key covers every input |
118
121
  | Same check in every job (type check, lint, lockfile policy) | one standalone gate; turn the copy off in builds; run policy checks only when their inputs change | keep the single gate required; never drop the check from CI |
119
122
  | Slow/silent failures | inner timeout and retained partial diagnostics | outer headroom; cleanup always; incomplete validation never passes |
@@ -20,9 +20,11 @@ merge to main ────► Cloud Build: build → push by digest → migrate
20
20
  rc tag ───────────► Cloud Build: prod candidate at 0% traffic ──► rush-release verifies, shifts traffic
21
21
  ```
22
22
 
23
- - **PR lane:** prove the change. Mergify admission < 2 min; no queue < 7 min (excluding E2E).
24
- - **Queue lane:** prove the merged result; run slow suites here. Mergify queue < 5 min
25
- (excluding E2E). Without a queue, run slow suites on the PR and require an up-to-date branch.
23
+ - **PR lane:** prove the change. Merge-queue admission runs ≤ 5 min; other runs ≤ 20 min.
24
+ - **Queue lane:** prove the merged result; run slow suites here. Queue validation runs
25
+ ≤ 15 min. Without a queue, run slow suites on the PR and require an up-to-date branch.
26
+ Run limits include E2E, builds and scheduling through full completion. Every job
27
+ separately targets < 5 min. See [timing criteria](speed-and-audit.md#sla).
26
28
  - **No main test lane with a queue:** the queue already tested the tree that lands on `main`;
27
29
  a merge to `main` triggers deploy, not a CI rerun. Without a queue, `push: main` tests it.
28
30
  - **Post-deploy lane:** test the deployed revision, never a local build.
@@ -103,7 +105,7 @@ Require exactly one check, `gate`, in branch protection and the queue. Template:
103
105
  - [ ] No `paths:` on a workflow that reports `gate`
104
106
  - [ ] One `gate` job with `if: always()`; it is the only required check
105
107
  - [ ] Area jobs gate on `changes` outputs; `gate` allows a skip only when that filter was false
106
- - [ ] Non-E2E timings meet the SLA (Mergify admission < 2 min, queue < 5 min; else PR CI < 7 min)
108
+ - [ ] Full run meets its inclusive limit: overall ≤ 20 min, merge-queue admission ≤ 5 min, queue validation ≤ 15 min; include E2E/builds and scheduling. Every job separately targets < 5 min.
107
109
  - [ ] Queue trigger handled (Mergify draft prefix or `merge_group`), if the repo uses a queue
108
110
  - [ ] Self-hosted: fork guard, canonical labels, `persist-credentials: false`, dynamic service ports
109
111
  - [ ] Third-party actions SHA-pinned (at least in jobs with secrets or `id-token`)
@@ -0,0 +1,72 @@
1
+ # PostgreSQL workflow configuration
2
+
3
+ Read when adding or auditing a PostgreSQL-backed GitHub Actions job. Infra owns
4
+ runner provisioning, slot pods, networking and cgroup enforcement. Workflows use
5
+ the interfaces it provides; this guide covers job configuration only.
6
+
7
+ ## Self-hosted jobs
8
+
9
+ Use the infra-provided `/opt/ci-helper.py` to start PostgreSQL in the current slot's
10
+ Podman pod. The database then shares the slot's CPU/memory allocation with the job.
11
+ Configure start → verify → database consumers → always-cleanup. Use this steps
12
+ fragment after the job's existing workspace cleanup and checkout:
13
+
14
+ ```yaml
15
+ - name: Start job-owned PostgreSQL
16
+ env:
17
+ PG_CONTAINER: pg-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
18
+ run: |
19
+ test -r /opt/ci-helper.py
20
+ python3 /opt/ci-helper.py postgres start --name "$PG_CONTAINER" \
21
+ --image postgres:17 --env POSTGRES_PASSWORD=test --wait 90
22
+ python3 /opt/ci-helper.py postgres verify --name "$PG_CONTAINER"
23
+ # Insert database preparation and tests here, using the endpoint supplied
24
+ # by the project's infra integration to set DATABASE_URL.
25
+ - name: Remove this job's PostgreSQL
26
+ if: always()
27
+ env:
28
+ PG_CONTAINER: pg-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
29
+ run: python3 /opt/ci-helper.py postgres stop --name "$PG_CONTAINER"
30
+ ```
31
+
32
+ - Pin the PostgreSQL image version and configure database/user/password for the
33
+ application. The example password is for a disposable test database.
34
+ - Include the matrix key in the container name for matrix jobs, consistently in
35
+ start, verify and stop. Keep the standard GitHub job identity variables available
36
+ to the helper; it owns the labels and instance-readiness checks.
37
+ - Set `DATABASE_URL` through the project's existing infra integration. Use its
38
+ supplied endpoint rather than assuming host networking or choosing a host port.
39
+ - Put cleanup after every database consumer in the calling job. A startup
40
+ composite action's final step executes before those consumers.
41
+ - Keep PostgreSQL, app servers and test/build worker pools within the slot's
42
+ shared resource budget. Use the helper for PostgreSQL; `services:` or standalone
43
+ `docker run`/`podman run` does not join that slot's aggregate cgroup boundary.
44
+ - A missing helper or incompatible endpoint is an infra integration blocker.
45
+ Report it to infra; leave pod creation, networking and cgroup configuration there.
46
+
47
+ Helper commands and supported options are owned by
48
+ [infra's CI helper interface](https://github.com/1aboveio/infra/blob/main/github-runner/ci-helper.py).
49
+
50
+ ## GitHub-hosted jobs
51
+
52
+ On GitHub-hosted runners, use a `services:` block with a dynamic host port:
53
+
54
+ ```yaml
55
+ services:
56
+ postgres:
57
+ image: postgres:17
58
+ env: { POSTGRES_USER: test, POSTGRES_PASSWORD: test, POSTGRES_DB: app }
59
+ ports: ['5432/tcp']
60
+ options: >-
61
+ --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid,size=1g
62
+ --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 25
63
+ env:
64
+ DATABASE_URL: postgresql://test:test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/app
65
+ ```
66
+
67
+ For disposable data, prefer size-bounded tmpfs when the supported integration
68
+ allows it and charge it to the memory budget. PostgreSQL 17 uses
69
+ `/var/lib/postgresql/data`; PostgreSQL 18 and later use `/var/lib/postgresql`.
70
+ Keep durability on unless measurement supports changing it and tests do not
71
+ prove persistence/recovery semantics. Pass approved server settings through the
72
+ supported helper interface on self-hosted jobs.