- 08-04-SUMMARY.md: publish job verified green (run #14), both tags pushed, security audit pass (PAT masked, --password-stdin), REGISTRY_PAT naming note - 08-VERIFICATION.md: all six phase-8 ROADMAP criteria passed with evidence table - REQUIREMENTS.md: CI-01 + CI-02 marked complete (checkboxes + traceability table) - ROADMAP.md: phase 8 marked [x] complete (2026-06-11), 08-04 plan ticked - STATE.md: phase complete, D-PAT-NAMING decision recorded, operator next steps updated
6.5 KiB
6.5 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | requirements-completed | duration | completed | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 08-gitea-ci | 04 | infra |
|
|
|
|
|
|
|
|
checkpoint-verified | 2026-06-11 |
Phase 08 Plan 04: Publish Job Summary
Publish job wired to push-to-main: API Docker production image pushed to Gitea registry under :latest and :v1.1-<7charsha>, PAT authenticated via --password-stdin (never plaintext), security audit passed — CI-02 delivered.
Performance
- Duration: multi-step (Task 1 executed, Task 2 was a human-verify checkpoint — verified green on run #14)
- Started: 2026-06-11
- Completed: 2026-06-11
- Tasks: 2 (1 auto + 1 human-verify checkpoint)
- Files modified: 1
Accomplishments
- Added the
publishjob to.gitea/workflows/ci.yml: gated ongithub.event_name == 'push' && github.ref == 'refs/heads/main', never fires on pull_request. - Run #14 (merge commit
98acff8pushed to main) confirmed SUCCESS (1m): docker login succeeded, both image tags pushed (same digest sha256:ce724852…) —familysync-api:latestandfamilysync-api:v1.1-98acff8present in Gitea Packages API. - Security audit of the CI log passed: PAT masked as
***throughout (Gitea secret scrubber);--password-stdinused exclusively; no-p/--passwordform anywhere;docker logoutran in thealways()cleanup step. No plaintext token anywhere in the log. - Identified and fixed the GITEA_-prefix secret naming bug: Gitea runner silently drops secrets whose names start with
GITEA_; renamed secret fromGITEA_REGISTRY_PATtoREGISTRY_PATin both the repo secret and ci.yml (commit73eecf7).
Task Commits
- Task 1: Add the publish job -
ebcc38d(feat) - Task 1 fix: REGISTRY_PAT naming -
73eecf7(fix — GITEA_ prefix exclusion) - Pre-merge cleanup: remove throwaway runner-probe.yml -
dcf4242(chore) - Task 2: Human-verify checkpoint — verified green (run #14); no code commit required
Files Created/Modified
.gitea/workflows/ci.yml— publish job added (push-to-main guard, --password-stdin docker login, build --target production from repo root, dual push :latest + :v1.1-, docker logout always())
Decisions Made
- REGISTRY_PAT naming (D-PAT-NAMING): Gitea reserves the
GITEA_prefix for built-in variables and silently strips any user-defined secret with that prefix from the runner environment. The original plan named the secretGITEA_REGISTRY_PAT; the fix renames it toREGISTRY_PAT(commit73eecf7). Downstream plans must useREGISTRY_PATif they add registry operations. - Shell form over marketplace actions:
echo "${{ secrets.REGISTRY_PAT }}" | docker login ... --password-stdin+docker build+docker pushrather thandocker/login-action/docker/build-push-action. This matches the 08-RESEARCH §Pattern 6 preferred path; no external action marketplace dependency. - Dual push: two separate
docker pushcalls (:latest+:<milestone>-<sha>) — same digest, two references.:latestis the moving pointer;:<milestone>-<sha>is the immutable traceability tag per D-04.
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] GITEA_REGISTRY_PAT secret prefix rejected by Gitea runner
- Found during: Task 1 → human-verify checkpoint (run #14 initially failed login)
- Issue: Gitea Actions runner silently ignores secrets with the
GITEA_prefix (reserved namespace). TheGITEA_REGISTRY_PATsecret was never injected into the job environment, causingdocker loginto fail with an empty password. - Fix: Renamed the Gitea repo secret from
GITEA_REGISTRY_PATtoREGISTRY_PATand updated the ci.yml reference accordingly (commit73eecf7). - Files modified:
.gitea/workflows/ci.yml - Verification: Run #14 succeeded — "Login Succeeded" in log; both tags pushed; PAT masked.
- Committed in:
73eecf7
Total deviations: 1 auto-fixed (Rule 1 - Bug) Impact on plan: Required for the publish job to function at all. No scope creep. Security outcome (no plaintext PAT) unchanged.
Issues Encountered
The GITEA_-prefix restriction was not documented in the plan or research notes; it was discovered empirically when the first publish run failed at docker login. The fix was straightforward once identified. No other issues encountered.
Next Phase Readiness
- Phase 8 (Gitea CI) is fully complete — all six ROADMAP success criteria met (see 08-VERIFICATION.md).
- CI-01 (PR regression: lint + typecheck + unit + API integration + mobile harness) delivered by plans 02 + 03.
- CI-02 (push-to-main publish) delivered by this plan (04).
- The Gitea registry now has a pullable
familysync-api:latestimage. Future phases can reference it for deployment documentation or smoke tests. - Phase 9 (Faster Write-Back) is fully independent and can start immediately.
Phase: 08-gitea-ci Completed: 2026-06-11