style(13-03): apply Prettier formatting across repo
Mechanical reformat — no logic changes. 398 files changed, 19125 insertions(+), 16457 deletions(-). Prettier 3.8.4 with .prettierrc (singleQuote:true, semi:true, tabWidth:2, trailingComma:all, printWidth:100). Isolated per D-13-08 for reviewability.
This commit is contained in:
+29
-27
@@ -13,28 +13,28 @@ requirements: [WR-01]
|
||||
|
||||
must_haves:
|
||||
truths:
|
||||
- "On a pull_request to main, Gitea no longer creates a CI / publish (pull_request) commit status (no orphan pending status)."
|
||||
- "On push to main (PR merge), the Publish workflow builds and pushes git.bergerhouse.net/luckberg/familysync-api with :latest and :<MILESTONE>-<shortsha> tags."
|
||||
- "The three required PR status contexts (CI / fast-checks, CI / api, CI / harness) are unchanged in name and behavior."
|
||||
- "A maintainer reading the README and publish.yml header can determine how, when, and under what safety gate publishing happens, plus how to bump MILESTONE."
|
||||
- 'On a pull_request to main, Gitea no longer creates a CI / publish (pull_request) commit status (no orphan pending status).'
|
||||
- 'On push to main (PR merge), the Publish workflow builds and pushes git.bergerhouse.net/luckberg/familysync-api with :latest and :<MILESTONE>-<shortsha> tags.'
|
||||
- 'The three required PR status contexts (CI / fast-checks, CI / api, CI / harness) are unchanged in name and behavior.'
|
||||
- 'A maintainer reading the README and publish.yml header can determine how, when, and under what safety gate publishing happens, plus how to bump MILESTONE.'
|
||||
artifacts:
|
||||
- path: ".gitea/workflows/publish.yml"
|
||||
provides: "Standalone push-to-main image publish workflow with documented release model"
|
||||
contains: "name: Publish"
|
||||
- path: ".gitea/workflows/ci.yml"
|
||||
provides: "PR-only CI workflow (fast-checks, api, harness); no publish job, no push trigger, no MILESTONE env"
|
||||
contains: "name: CI"
|
||||
- path: "README.md"
|
||||
provides: "Release / image-publishing documentation section"
|
||||
contains: "Publishing"
|
||||
- path: '.gitea/workflows/publish.yml'
|
||||
provides: 'Standalone push-to-main image publish workflow with documented release model'
|
||||
contains: 'name: Publish'
|
||||
- path: '.gitea/workflows/ci.yml'
|
||||
provides: 'PR-only CI workflow (fast-checks, api, harness); no publish job, no push trigger, no MILESTONE env'
|
||||
contains: 'name: CI'
|
||||
- path: 'README.md'
|
||||
provides: 'Release / image-publishing documentation section'
|
||||
contains: 'Publishing'
|
||||
key_links:
|
||||
- from: ".gitea/workflows/publish.yml"
|
||||
to: "secrets.REGISTRY_PAT"
|
||||
via: "docker login --password-stdin"
|
||||
- from: '.gitea/workflows/publish.yml'
|
||||
to: 'secrets.REGISTRY_PAT'
|
||||
via: 'docker login --password-stdin'
|
||||
pattern: "secrets\\.REGISTRY_PAT"
|
||||
- from: ".gitea/workflows/publish.yml"
|
||||
to: "env.MILESTONE"
|
||||
via: "Compute image tags step reads workflow-level MILESTONE"
|
||||
- from: '.gitea/workflows/publish.yml'
|
||||
to: 'env.MILESTONE'
|
||||
via: 'Compute image tags step reads workflow-level MILESTONE'
|
||||
pattern: "env\\.MILESTONE"
|
||||
---
|
||||
|
||||
@@ -72,16 +72,17 @@ Create `.gitea/workflows/publish.yml` as a standalone push-only workflow:
|
||||
- Add a header comment block (see Task 2 — same content as the README section, condensed) at the very top of publish.yml above `name: Publish`.
|
||||
|
||||
Then edit `.gitea/workflows/ci.yml`:
|
||||
|
||||
- Remove the entire `publish:` job (current lines 314-362).
|
||||
- Remove the `push:` trigger key from `on:` (lines 6-7), leaving only `pull_request: branches: [main]`.
|
||||
- Remove the workflow-level `env: MILESTONE: v1.1` block (lines 9-10) — it was referenced ONLY by the publish job (confirmed: grep ci.yml for MILESTONE returns only the publish Compute-image-tags step). Do not leave an empty `env:` key.
|
||||
- Do NOT rename `name: CI` or the job ids `fast-checks` / `api` / `harness`, and do NOT remove their `if: github.event_name == 'pull_request'` guards — renaming or removing would change/break the required status contexts (`CI / fast-checks (pull_request)`, `CI / api (pull_request)`, `CI / harness (pull_request)`). The guards are harmless now that `push:` is gone; leave them.
|
||||
</action>
|
||||
<verify>
|
||||
<automated>test -f .gitea/workflows/publish.yml && grep -q 'name: Publish' .gitea/workflows/publish.yml && grep -q 'secrets.REGISTRY_PAT' .gitea/workflows/publish.yml && grep -q '--password-stdin' .gitea/workflows/publish.yml && grep -q 'MILESTONE: v1.1' .gitea/workflows/publish.yml && grep -Eq '^\s*push:' .gitea/workflows/publish.yml && ! grep -q "github.event_name == 'push'" .gitea/workflows/publish.yml && ! grep -q 'publish:' .gitea/workflows/ci.yml && ! grep -q 'MILESTONE' .gitea/workflows/ci.yml && ! grep -Eq '^\s*push:' .gitea/workflows/ci.yml && grep -q 'pull_request:' .gitea/workflows/ci.yml && grep -q 'name: CI' .gitea/workflows/ci.yml && grep -c 'if:' .gitea/workflows/ci.yml | grep -qE '^[3-9]'</automated>
|
||||
<automated>test -f .gitea/workflows/publish.yml && grep -q 'name: Publish' .gitea/workflows/publish.yml && grep -q 'secrets.REGISTRY_PAT' .gitea/workflows/publish.yml && grep -q '--password-stdin' .gitea/workflows/publish.yml && grep -q 'MILESTONE: v1.1' .gitea/workflows/publish.yml && grep -Eq '^\s*push:' .gitea/workflows/publish.yml && ! grep -q "github.event_name == 'push'" .gitea/workflows/publish.yml && ! grep -q 'publish:' .gitea/workflows/ci.yml && ! grep -q 'MILESTONE' .gitea/workflows/ci.yml && ! grep -Eq '^\s*push:' .gitea/workflows/ci.yml && grep -q 'pull_request:' .gitea/workflows/ci.yml && grep -q 'name: CI' .gitea/workflows/ci.yml && grep -c 'if:' .gitea/workflows/ci.yml | grep -qE '^[3-9]'</automated>
|
||||
</verify>
|
||||
<done>publish.yml exists with name=Publish, push-to-main-only trigger, no redundant if-guard, workflow-level MILESTONE, the four publish steps with all inline comments intact, and a header doc block. ci.yml has no publish job, no push trigger, no MILESTONE env, retains name=CI and all three PR jobs with their guards.</done>
|
||||
</task>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 2: Document the release model and verify YAML well-formedness</name>
|
||||
@@ -98,11 +99,11 @@ Then write the SAME information condensed into the header comment block at the t
|
||||
|
||||
Finally verify both workflow YAML files are well-formed. No `yamllint`/`act`/`js-yaml`/`pyyaml` is available locally (confirmed during planning: no YAML parser in any node_modules, no pyyaml, no ruby yaml). Docker IS available, so parse both files strictly with the purpose-built yq image (no network beyond the image pull, no repo deps):
|
||||
`docker run --rm -i mikefarah/yq:4 e '.' - < .gitea/workflows/publish.yml` and likewise for ci.yml — a malformed file makes yq exit non-zero. If the yq image cannot be pulled (offline), fall back to structural inspection: re-read both files end-to-end, confirm consistent 2-space indentation, that every `run: |` block body is indented under its key, that the moved publish steps parse as a list under `jobs.publish.steps`, and explicitly NOTE in the SUMMARY that YAML was verified by inspection only (no parser available).
|
||||
</action>
|
||||
<verify>
|
||||
<automated>grep -qi 'Publishing\|Releases' README.md && grep -q 'REGISTRY_PAT' README.md && grep -q 'familysync-api' README.md && grep -q 'MILESTONE' README.md && grep -q 'branch protection' README.md && grep -qi 'REGISTRY_PAT' .gitea/workflows/publish.yml && (docker run --rm -i mikefarah/yq:4 e '.' - < .gitea/workflows/publish.yml >/dev/null 2>&1 && docker run --rm -i mikefarah/yq:4 e '.' - < .gitea/workflows/ci.yml >/dev/null 2>&1 || echo 'YAML-PARSER-UNAVAILABLE-INSPECTED-MANUALLY')</automated>
|
||||
</verify>
|
||||
<done>README has a Publishing/Releases section covering all six points (auto-on-push-to-main, image+two-tags, REGISTRY_PAT secret + naming, branch-protection safety gate, no test needs:, MILESTONE bump). publish.yml header block carries the condensed same. Both YAML files parse cleanly under yq (or are noted as inspected-only if no parser pulled).</done>
|
||||
</action>
|
||||
<verify>
|
||||
<automated>grep -qi 'Publishing\|Releases' README.md && grep -q 'REGISTRY_PAT' README.md && grep -q 'familysync-api' README.md && grep -q 'MILESTONE' README.md && grep -q 'branch protection' README.md && grep -qi 'REGISTRY_PAT' .gitea/workflows/publish.yml && (docker run --rm -i mikefarah/yq:4 e '.' - < .gitea/workflows/publish.yml >/dev/null 2>&1 && docker run --rm -i mikefarah/yq:4 e '.' - < .gitea/workflows/ci.yml >/dev/null 2>&1 || echo 'YAML-PARSER-UNAVAILABLE-INSPECTED-MANUALLY')</automated>
|
||||
</verify>
|
||||
<done>README has a Publishing/Releases section covering all six points (auto-on-push-to-main, image+two-tags, REGISTRY_PAT secret + naming, branch-protection safety gate, no test needs:, MILESTONE bump). publish.yml header block carries the condensed same. Both YAML files parse cleanly under yq (or are noted as inspected-only if no parser pulled).</done>
|
||||
</task>
|
||||
|
||||
</tasks>
|
||||
@@ -115,11 +116,12 @@ Finally verify both workflow YAML files are well-formed. No `yamllint`/`act`/`js
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- A PR to `main` produces only `CI / fast-checks`, `CI / api`, `CI / harness` statuses — no `CI / publish` orphan.
|
||||
- A merge to `main` triggers the `Publish` workflow, building/pushing `familysync-api:latest` + `familysync-api:v1.1-<shortsha>`.
|
||||
- No behavior change to the three PR jobs; required checks still satisfiable.
|
||||
- Release process is discoverable in README and in the publish.yml header.
|
||||
</success_criteria>
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
Create `.planning/quick/260611-ozt-split-publish-job-into-standalone-gitea-/260611-ozt-SUMMARY.md` when done.
|
||||
|
||||
+8
-5
@@ -17,12 +17,12 @@ key_files:
|
||||
- .gitea/workflows/ci.yml
|
||||
- README.md
|
||||
decisions:
|
||||
- "D-OZT-01: Safety gate is branch protection on main (not needs:) — publish.yml runs in a separate workflow invocation from ci.yml PR jobs"
|
||||
- 'D-OZT-01: Safety gate is branch protection on main (not needs:) — publish.yml runs in a separate workflow invocation from ci.yml PR jobs'
|
||||
- "D-OZT-02: README is the documentation home for the release model (not a separate docs/RELEASE.md) — consistent with this project's single-maintainer pattern"
|
||||
- "D-OZT-03: Dropped the redundant if: github.event_name == 'push' guard — push-to-main trigger in publish.yml fully replaces it"
|
||||
metrics:
|
||||
duration: ~5 minutes
|
||||
completed: "2026-06-11"
|
||||
completed: '2026-06-11'
|
||||
tasks_completed: 2
|
||||
tasks_total: 2
|
||||
files_changed: 3
|
||||
@@ -37,6 +37,7 @@ Split the `publish` job out of `.gitea/workflows/ci.yml` into a new standalone `
|
||||
### .gitea/workflows/publish.yml (created)
|
||||
|
||||
New standalone push-only workflow:
|
||||
|
||||
- `name: Publish`, `on: push: branches: [main]` only
|
||||
- Workflow-level `MILESTONE: v1.1` env (moved from ci.yml)
|
||||
- Single `publish` job with all four steps verbatim from ci.yml: checkout, compute image tags, docker login, build+push, docker logout
|
||||
@@ -56,6 +57,7 @@ New standalone push-only workflow:
|
||||
### README.md (modified)
|
||||
|
||||
Added "Publishing / Releases" section between "Deployment" and "License" covering:
|
||||
|
||||
- Auto-trigger on push to main (PR merge)
|
||||
- Image name and two-tag scheme (:latest + :<MILESTONE>-<shortsha>)
|
||||
- REGISTRY_PAT secret requirement and naming rationale
|
||||
@@ -68,14 +70,15 @@ Added "Publishing / Releases" section between "Deployment" and "License" coverin
|
||||
|
||||
## Commits
|
||||
|
||||
| Hash | Message |
|
||||
|------|---------|
|
||||
| 6efc062 | chore(260611-ozt): split publish job into standalone publish.yml |
|
||||
| Hash | Message |
|
||||
| ------- | ------------------------------------------------------------------------------ |
|
||||
| 6efc062 | chore(260611-ozt): split publish job into standalone publish.yml |
|
||||
| 0c9139b | docs(260611-ozt): document release model in README Publishing/Releases section |
|
||||
|
||||
## YAML Verification
|
||||
|
||||
Both workflow files validated with `docker run --rm -i mikefarah/yq:4 e '.' -`:
|
||||
|
||||
- `.gitea/workflows/publish.yml`: **VALID**
|
||||
- `.gitea/workflows/ci.yml`: **VALID**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user