Security Scan (SIAX Cloud) / security (push) Successful in 17s
CI (SIAX Cloud) / security (push) Successful in 26s
CI (SIAX Cloud) / integration (push) Successful in 30s
CI (SIAX Cloud) / quality (push) Successful in 37s
CI (SIAX Cloud) / security (pull_request) Successful in 15s
CI (SIAX Cloud) / integration (pull_request) Successful in 25s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 26s
CI (SIAX Cloud) / quality (pull_request) Successful in 50s
0pt.app svarar i dag HTTP 402 DEPLOYMENT_DISABLED (Vercels betalningsspärr) och
har ingen självhostad ersättare igång. Det här gör appen faktiskt byggbar och
körbar på Coolify. Referens: sax3l/siax-io, som redan kör självhostat på flottan
— dess Dockerfile återanvänds i form i stället för att uppfinna ett eget mönster.
next.config.mjs:
* output: "standalone" — runtime-imagen kör `node server.js` i stället för att
släpa med pnpm, corepack och hela node_modules-trädet.
* images.unoptimized: true BORTTAGET. Det var v0-generatorns standardvärde, inte
ett val: next.config.mjs var orörd sedan "Initial commit from v0". Självhostat
är rätt lösning att låta Next optimera själv.
* poweredByHeader: false.
Dockerfile (fyra steg, samma form som siax-io):
* node:24-alpine -> node:22-alpine. Båda CI-workflowsen bygger på node 22;
att bygga och köra på samma major som grinden testar tar bort en version-skew.
* libc6-compat (sharp), icke-root `node`, HEALTHCHECK mot /api/health,
npm/npx strippat ur runtime-imagen (SIO-019-mönstret).
* --ignore-workspace borttaget: motiveringen i kommentaren var inaktuell sedan
P1-21 (pnpm-workspace.yaml har ett giltigt packages:-fält och
packages/schemas är en riktig medlem). Containerinstallationen blir därmed
bit för bit samma kommando som CI kör.
* --prod=false: Coolify injicerar NODE_ENV=production vid byggtid, och pnpm
hoppar då över devDependencies som next build kräver.
Sharp levereras i ett eget npm-steg, och det är inte godtyckligt:
next build spårar INTE sharp in i .next/standalone (verifierat: standalone-
utdatans node_modules innehöll bara next/, react/, react-dom/). Den uppenbara
lösningen outputFileTracingIncludes fungerar bevisligen inte — globben
"./node_modules/@img/**/*" får Turbopack att panika på pnpms katalogsymlänkar
("Is a directory (os error 21)") och bygget faller med exit 1. Reproducerat, inte
antaget. npm-steget lägger ett platt, symlänkfritt träd som runtime-steget kan
kopiera rakt av, pinnat till versionen i pnpm-lock.yaml, och faller hårt om
versionen inte går att läsa ut i stället för att tyst skeppa trasig optimering.
BEVISAT, inte påstått (fullständiga exitkoder i PR-beskrivningen):
* pnpm install --frozen-lockfile -> 0; next build med HELT TOM env -> 0
* docker build --no-cache -> 0; container startar, /api/health -> HTTP 200
* /api/ready utan DATABASE_URL -> HTTP 503 (faller stängt, som avsett)
* /api/0pt/* utan Bearer -> HTTP 401 (middleware kör självhostat)
* /_next/image -> HTTP 200 image/avif, 1 488 706 B PNG -> 51 161 B (29x)
* sharp laddar i runtime-imagen (libvips 8.18.6, musl-binärer)
* icke-root uid=1000, HEALTHCHECK "healthy", image 1,33 GB -> 423 MB
* typecheck 0, test 0 (930 passerade). lint/prettier faller identiskt på ren
main => pre-existerande, inte infört här. Ingen grind har rörts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
89 lines
4.8 KiB
Markdown
89 lines
4.8 KiB
Markdown
# Changelog
|
||
|
||
> BACKLOG P1-3. Format loosely follows [Keep a Changelog](https://keepachangelog.com/).
|
||
> No git tags/releases exist yet for this repo — this file starts the practice
|
||
> retroactively from real `git log` history rather than inventing version
|
||
> numbers that were never cut. Dates are commit dates on `main`, not calendar
|
||
> "release" dates (there have been none).
|
||
|
||
## [Unreleased]
|
||
|
||
- `feat(deploy)`: appen är nu faktiskt byggbar och körbar utanför Vercel.
|
||
`next.config.mjs` sätter `output: "standalone"`; Dockerfilen är omskriven
|
||
till samma form som `sax3l/siax-io` (som redan körs självhostat på flottan):
|
||
fyra steg, `node:22-alpine` (matchar CI:s nodversion, var 24), `libc6-compat`,
|
||
icke-root, HEALTHCHECK mot `/api/health`, npm/npx borttaget ur runtime-imagen.
|
||
Uppmätt: image 1,33 GB -> 423 MB. `--ignore-workspace` borttaget (dess
|
||
motivering var inaktuell sedan P1-21) så containerinstallationen är samma
|
||
kommando som CI kör; `--prod=false` tillagt eftersom Coolify sätter
|
||
NODE_ENV=production vid byggtid och pnpm då hoppar över devDependencies.
|
||
- `fix(images)`: `images.unoptimized: true` borttaget — det var v0-generatorns
|
||
standardvärde, inte ett val (`next.config.mjs` var orörd sedan initial commit).
|
||
Självhostad bildoptimering kräver att `sharp` faktiskt finns i runtime-imagen:
|
||
`next build` spårar den inte in i `.next/standalone`, och
|
||
`outputFileTracingIncludes` får Turbopack att panika på pnpms symlänkar. Sharp
|
||
levereras därför i ett eget npm-steg i Dockerfile, pinnat till versionen i
|
||
`pnpm-lock.yaml`. Verifierat i containern: `/_next/image` svarar 200 med
|
||
`image/avif` (1,46 MB PNG -> 6,7 kB).
|
||
- `chore(deploy)`: `poweredByHeader: false` (ingen `X-Powered-By: Next.js`).
|
||
|
||
- fix(security): security headers (CSP/HSTS/X-Frame-Options/etc.) + CI
|
||
security gates actually enforce (Trivy `--exit-code 1`, gitleaks) instead
|
||
of advisory-only. Actions pinned to commit SHA. SBOM + license inventory
|
||
as CI artifacts. (BACKLOG P0-13, P0-16, P0-19, P1-14, P1-15)
|
||
- fix(health): `/api/health` reports real per-dependency status instead of a
|
||
hardcoded `ok: true`; new `/api/ready` readiness endpoint. (BACKLOG P0-3)
|
||
- docs/chore: repo-hygiene pass — schema-valid `siax.repo.json`/`siax.config.json`
|
||
(standard v2.0), ADRs, this CHANGELOG, `siax:doctor` script, devcontainer,
|
||
`docs/architecture/ARCHITECTURE.md` §5 "Ytor och paritet", CODEOWNERS,
|
||
stale-link cleanup. (BACKLOG P1-1, P1-2, P1-3, P1-19, P1-20, P1-21, P2-5, P3-5)
|
||
|
||
## 2026-08-11 — Evasion-stack decision provenance
|
||
|
||
- Attributed and dated the account-owner's keep-decision on `services/scrapers/*`
|
||
across `SECURITY.md`, `CONTRIBUTING.md`, `prompts/002-compliance-audit.md`,
|
||
`renovate.json`, `.gitea/workflows/security.yml`, `docs/slo.md`.
|
||
|
||
## 2026-08-09/10 — Golden Standard compliance pass (FAS 0–10)
|
||
|
||
- `docs/compliance/{INVENTORY,RELATIONS,OSS-INVENTORY,GOLDEN-STANDARD-REPORT,BACKLOG,SLUTRAPPORT}.md`
|
||
written; `siax.repo.json` classification recorded.
|
||
- `fix(security)`: `GET /api/orders` and `GET /api/admin/metrics` now require
|
||
auth (were live 200 anonymous — the routes sit outside `middleware.ts`'s
|
||
`/api/0pt/:path*` matcher).
|
||
- `fix(deploy)`: `siax.config.json` `deploy.target` flipped from `vercel` to
|
||
`coolify` (config-only; the live instance is still on Vercel until a
|
||
Coolify app is provisioned and DNS is cut over).
|
||
- `feat(contract)`: OpenAPI 3.1 SSOT added (`contracts/openapi.yaml`);
|
||
`@vercel/analytics` and `next/font/google` removed in favor of self-hosted
|
||
`@fontsource-variable/*` (AR-4).
|
||
- `ci(workflows)`: CD/security/nightly split under `.gitea/workflows/`.
|
||
- README/SECURITY/CONTRIBUTING/AGENTS + runbooks (deploy, incident,
|
||
backup-restore, oncall) + SLO doc added.
|
||
|
||
## 2026-08 — Auth + capability hardening ("Wave 2/3")
|
||
|
||
- `fix(auth)`: `AUTH_ENFORCE` default flipped to fail-closed on `/api/0pt/*`.
|
||
- Zitadel Bearer-token verification wired into `middleware.ts`
|
||
(`src/auth/zitadel.ts`, `src/auth/context.ts`).
|
||
- P0 capability layer built out: `0pt.query_source`, document
|
||
capture/extraction, Iceberg write-boundary, external writeback, dataset
|
||
quality flow docs.
|
||
- CI quality gate added (typecheck/lint/test), `.env.example` committed
|
||
(previously blocked by a blanket `.gitignore` `.env*` rule).
|
||
|
||
## 2026-07-13 — Scraper stack (kept, see BACKLOG P3-3 / SECURITY.md)
|
||
|
||
- `services/scrapers/*` (WAF-bypass, proxy rotation, ClickHouse pipeline) was
|
||
added on the Gitea line of history. This is the subject of the dated,
|
||
attributed account-owner decision referenced throughout this repo's
|
||
compliance docs — not reopened or altered by this changelog entry.
|
||
|
||
## Earlier
|
||
|
||
- Initial Next.js scaffold, order/catalog/portal UI, FastAPI engine
|
||
scaffold, i18n (EN/SV) and accessibility passes, lakehouse write-path
|
||
ownership ADR (`ADR-0030`, in the `n0d` repo).
|
||
|
||
[Unreleased]: https://git.siax.io/sax3l/0pt/compare/main...HEAD
|