Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27b7618e86 | ||
|
|
1ad60f1b7e | ||
|
|
197c928998 | ||
|
|
eafb247ca7 | ||
|
|
af794fbd93 | ||
|
|
18f517fe5e | ||
|
|
32085564b1 | ||
|
|
4351fffaae | ||
|
|
501b9f2533 | ||
|
|
8bd1fc0aac |
No files matched your search
+12
-5
@@ -26,13 +26,20 @@ updates:
|
||||
minor-and-patch:
|
||||
update-types: [minor, patch]
|
||||
ignore:
|
||||
# D21 — TypeScript 7's native compiler does not expose the API that
|
||||
# `astro check` needs, so `pnpm check` fails on it. Hold at 6.x.
|
||||
# D21 (amended 2026-10-23) — TypeScript runs side by side. `typescript`
|
||||
# is the @typescript/typescript6 wrapper: the TS 6 API that astro check,
|
||||
# typescript-eslint and svelte2tsx load (TS 7 ships none yet). TS 7 itself
|
||||
# is `@typescript/native` (an alias of typescript@7), whose `tsc` checks
|
||||
# the .ts files. Majors of either are a decision, not a weekly bump.
|
||||
# Dependabot's handling of `npm:` aliases is unproven here — ⚠ verify on
|
||||
# the first Monday run after the switch.
|
||||
- dependency-name: typescript
|
||||
update-types: ['version-update:semver-major']
|
||||
# The Node typings track the Node major in .nvmrc (24 LTS), not the
|
||||
# newest Node: @types/node 26 types APIs the runtime does not have.
|
||||
# Bump both together when .nvmrc moves (docs/01 §4).
|
||||
- dependency-name: '@typescript/native'
|
||||
update-types: ['version-update:semver-major']
|
||||
# The Node typings track the Node major in .nvmrc (26), not the newest
|
||||
# Node: a newer @types/node types APIs the runtime does not have. Bump
|
||||
# both together when .nvmrc moves (docs/01 §5 rule 4).
|
||||
- dependency-name: '@types/node'
|
||||
update-types: ['version-update:semver-major']
|
||||
commit-message:
|
||||
|
||||
@@ -29,9 +29,10 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
# Lets quarantine.yml run the required checks on the PR it opens: a PR
|
||||
# created with GITHUB_TOKEN triggers no `pull_request` workflows, but a
|
||||
# `workflow_dispatch` is the documented exception (docs/12 §4).
|
||||
# Lets quarantine.yml and vt-recheck.yml run the required checks on the PRs
|
||||
# they open. A PR created with GITHUB_TOKEN gets `pull_request` runs that
|
||||
# wait for a maintainer's approval (GitHub, since 2026-06-11); a
|
||||
# `workflow_dispatch` always runs (docs/12 §4).
|
||||
workflow_dispatch:
|
||||
|
||||
# Explicit least privilege. This repository's default workflow token is
|
||||
@@ -146,9 +147,13 @@ jobs:
|
||||
- name: Audit production deps
|
||||
run: pnpm audit --prod
|
||||
|
||||
# PR-time link check over changed data files only; link-check.yml owns
|
||||
# the weekly full sweep (docs/12 §5). git runs HERE, under pipefail, so a
|
||||
# failed diff stops the job instead of silently widening the sweep.
|
||||
# PR-time link check over the links a PR adds or edits — the URLs on the
|
||||
# diff's added lines — not every link in every touched file: a re-check
|
||||
# PR that rewrote 198 security blocks once had to re-verify ~700
|
||||
# unrelated vendor links, and one vendor's bad minute blocked it.
|
||||
# link-check.yml owns the weekly full sweep (docs/12 §5). git runs HERE,
|
||||
# under pipefail, so a failed diff stops the job instead of silently
|
||||
# narrowing the check.
|
||||
- name: Collect changed official links
|
||||
id: urls
|
||||
if: github.event_name == 'pull_request'
|
||||
@@ -156,8 +161,8 @@ jobs:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git diff --name-only "origin/${BASE_REF}...HEAD" -- src/data/apps \
|
||||
| node scripts/extract-urls.mjs --changed > /tmp/urls.txt
|
||||
git diff -U0 "origin/${BASE_REF}...HEAD" -- src/data/apps \
|
||||
| node scripts/extract-urls.mjs --added > /tmp/urls.txt
|
||||
count=$(grep -c . /tmp/urls.txt || true)
|
||||
echo "count=$count" >> "$GITHUB_OUTPUT"
|
||||
echo "$count changed URL(s) to check"
|
||||
@@ -190,3 +195,58 @@ jobs:
|
||||
--max-concurrency 4 --retry-wait-time 5 --max-retries 4 --timeout 45
|
||||
--accept '200..=299,403,429'
|
||||
/tmp/urls.txt
|
||||
|
||||
# docs/12 §2 — SonarQube Cloud, CI-based analysis (sonar-project.properties).
|
||||
# Deliberately NOT a required check: a Sonar outage must never block a
|
||||
# merge, and a failing quality gate still turns this job red on the PR
|
||||
# (`sonar.qualitygate.wait`).
|
||||
#
|
||||
# The `if:` may only read the `github` context. A `secrets` reference there
|
||||
# makes the WHOLE workflow invalid — and then `build` and `gates`, which are
|
||||
# required, never appear. Runs that would lack SONAR_TOKEN are skipped
|
||||
# instead: Dependabot (its secrets are a separate store), pull requests from
|
||||
# forks, and the bot data PRs that quarantine.yml / vt-recheck.yml dispatch
|
||||
# CI on (`workflow_dispatch`, or `pull_request` runs a maintainer approves).
|
||||
sonar:
|
||||
if: >-
|
||||
github.event_name != 'workflow_dispatch' &&
|
||||
github.actor != 'dependabot[bot]' &&
|
||||
github.actor != 'github-actions[bot]' &&
|
||||
(github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# Blame and the new-code period come from history: a shallow clone
|
||||
# makes Sonar attribute old lines to the latest commit.
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
# The same unit run as the build job's; Sonar reads coverage/lcov.info.
|
||||
- name: Unit tests (coverage report)
|
||||
run: pnpm coverage
|
||||
# "Previous version" is this project's new-code period, so each analysis
|
||||
# carries package.json's version: new code on main is then everything
|
||||
# since the last release instead of everything since the first scan.
|
||||
- name: Project version
|
||||
id: version
|
||||
run: echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
|
||||
# scannerVersion pins the newest SonarScanner CLI (the action's default
|
||||
# trails it); the action verifies the download's signature.
|
||||
- name: SonarQube Cloud scan
|
||||
uses: SonarSource/sonarqube-scan-action@d209202bc7d53ff1cc128f7f907dac145c9d6ae9 # v8.3.0
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
with:
|
||||
scannerVersion: 8.2.0.6438
|
||||
args: >-
|
||||
-Dsonar.projectVersion=${{ steps.version.outputs.version }}
|
||||
-Dsonar.qualitygate.wait=true
|
||||
@@ -14,8 +14,9 @@ on:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '31 3 * * 1'
|
||||
# quarantine.yml dispatches this on the PR it opens (GITHUB_TOKEN-created PRs
|
||||
# trigger no pull_request runs, so the required check would never appear).
|
||||
# quarantine.yml and vt-recheck.yml dispatch this on the PRs they open: a
|
||||
# GITHUB_TOKEN-created PR's pull_request runs wait for approval (GitHub,
|
||||
# since 2026-06-11), so the required check would not appear on its own.
|
||||
workflow_dispatch:
|
||||
|
||||
# Required matrix — security-events: write is what lets results upload.
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
# checks still apply.
|
||||
#
|
||||
# Fixed 2026-10-21 (audit):
|
||||
# - A PR opened with GITHUB_TOKEN triggers no `pull_request` workflows, so its
|
||||
# required checks (build, gates, codeql) never ran and it could not merge.
|
||||
# The job now dispatches ci.yml and codeql.yml on the PR branch —
|
||||
# `workflow_dispatch` is the documented exception to that rule.
|
||||
# - A PR opened with GITHUB_TOKEN triggered no `pull_request` workflows, so
|
||||
# its required checks (build, gates, codeql) never ran and it could not
|
||||
# merge. The job dispatches ci.yml and codeql.yml on the PR branch —
|
||||
# `workflow_dispatch` always runs. (Since GitHub's 2026-06-11 change such
|
||||
# a PR does get `pull_request` runs, but they wait for a maintainer's
|
||||
# approval, so the dispatch is still what makes the checks appear.)
|
||||
# - The ruleset requires signed commits: create-pull-request now signs via the
|
||||
# API (`sign-commits`).
|
||||
# - Every nightly run re-opened `[quarantine] <slug>` issues while the PR was
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
# docs/12 §4b — VirusTotal re-check (docs/09 §6 step 5, assisted).
|
||||
#
|
||||
# Daily on main: scripts/vt-recheck.mjs re-scans the entries whose check is
|
||||
# due and the bot opens — or updates — ONE pull request, `vt/recheck`. While
|
||||
# that PR is open, each run first carries its results over, so the next day
|
||||
# continues with the next entries instead of re-scanning the same stalest
|
||||
# ones (main still shows them as stale until the PR merges). A detection
|
||||
# never flags anything: a `clean` entry becomes `unverified` and gets a
|
||||
# tracking issue, and the maintainer decides (quarantine stays a reviewed
|
||||
# `pnpm quarantine`, hard rule 5).
|
||||
#
|
||||
# Dispatched on any other branch it is a PREVIEW: it scans only the listed
|
||||
# slugs — or, with none, the entries that were never scanned, i.e. a data
|
||||
# PR's new apps — and uploads the patched files as the `vt-preview` artifact
|
||||
# for the maintainer to review and commit. No PR, no issues.
|
||||
#
|
||||
# VirusTotal's Public API allows 4 requests a minute and 500 a day (reset at
|
||||
# 00:00 UTC, hence the schedule). The script paces itself, spends at most the
|
||||
# `budget`, and stops cleanly at the quota; the next run continues. The
|
||||
# concurrency group keeps two runs from sharing the key's per-minute limit.
|
||||
name: vt-recheck
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '41 0 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
slugs:
|
||||
description: 'Slugs to scan first, space or comma separated (on a branch other than main: only these, or the never-scanned when empty)'
|
||||
required: false
|
||||
default: ''
|
||||
promote:
|
||||
description: "Slugs to move unverified → clean IF their scan comes back clean — the maintainer's docs/09 §6 call"
|
||||
required: false
|
||||
default: ''
|
||||
max_age:
|
||||
description: 'Re-scan checks older than this many days'
|
||||
required: false
|
||||
default: '90'
|
||||
budget:
|
||||
description: 'VirusTotal requests this run may spend (500/day; each URL costs at least 2)'
|
||||
required: false
|
||||
default: '440'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: vt-recheck
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
recheck:
|
||||
runs-on: ubuntu-latest
|
||||
# 440 requests at 15.5 s each is about two hours.
|
||||
timeout-minutes: 150
|
||||
permissions:
|
||||
contents: write # create-pull-request commits to vt/recheck
|
||||
pull-requests: write # …and opens or updates the PR
|
||||
issues: write # one tracking issue per detection
|
||||
actions: write # dispatch the required checks onto the PR branch
|
||||
steps:
|
||||
# No persisted token while repository code runs; create-pull-request
|
||||
# authenticates with its own `token` input.
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
|
||||
# Only an OPEN pull request's results are carried: the repository
|
||||
# deletes merged branches, and a PR closed without merging was a
|
||||
# rejection, never to be re-adopted.
|
||||
- name: Carry the open re-check PR
|
||||
id: carry
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
open=$(gh pr list --repo "$GITHUB_REPOSITORY" --head vt/recheck --state open --json number --jq 'length')
|
||||
if [ "$open" = "0" ]; then
|
||||
echo "No open re-check PR — nothing to carry."
|
||||
exit 0
|
||||
fi
|
||||
git fetch --no-tags --depth=1 origin vt/recheck
|
||||
mkdir -p "$RUNNER_TEMP/carry"
|
||||
git archive FETCH_HEAD src/data/apps | tar -x -C "$RUNNER_TEMP/carry"
|
||||
echo "dir=$RUNNER_TEMP/carry/src/data/apps" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Everything reaches the script through env (never `${{ }}` inside
|
||||
# `run:`); it validates slugs and numbers itself.
|
||||
- name: Re-check on VirusTotal
|
||||
id: scan
|
||||
env:
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
VT_SLUGS: ${{ inputs.slugs }}
|
||||
VT_PROMOTE: ${{ inputs.promote }}
|
||||
VT_MAX_AGE: ${{ inputs.max_age }}
|
||||
VT_BUDGET: ${{ inputs.budget }}
|
||||
VT_ONLY_LISTED: ${{ github.ref != 'refs/heads/main' && '1' || '' }}
|
||||
VT_CARRY: ${{ steps.carry.outputs.dir }}
|
||||
VT_SUMMARY: ${{ runner.temp }}/vt-summary.md
|
||||
VT_REVIEW_JSON: ${{ runner.temp }}/vt-review.json
|
||||
run: node scripts/vt-recheck.mjs
|
||||
|
||||
- name: Job summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f "$RUNNER_TEMP/vt-summary.md" ]; then
|
||||
cat "$RUNNER_TEMP/vt-summary.md" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
# ── preview (any branch but main) ─────────────────────────────────────
|
||||
- name: Collect the preview
|
||||
if: github.ref != 'refs/heads/main' && steps.scan.outputs.changed != '0'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$RUNNER_TEMP/vt-preview"
|
||||
git diff --name-only -- src/data/apps | while read -r f; do
|
||||
cp --parents "$f" "$RUNNER_TEMP/vt-preview/"
|
||||
done
|
||||
cp "$RUNNER_TEMP/vt-summary.md" "$RUNNER_TEMP/vt-preview/"
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
if: github.ref != 'refs/heads/main' && steps.scan.outputs.changed != '0'
|
||||
with:
|
||||
name: vt-preview
|
||||
path: ${{ runner.temp }}/vt-preview/
|
||||
retention-days: 7
|
||||
|
||||
# ── main: one accumulating PR ─────────────────────────────────────────
|
||||
# NOTE: requires Settings → Actions → General → "Allow GitHub Actions to
|
||||
# create and approve pull requests" (H10 — enabled for quarantine.yml).
|
||||
- id: cpr
|
||||
if: github.ref == 'refs/heads/main' && steps.scan.outputs.changed != '0'
|
||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
branch: vt/recheck
|
||||
add-paths: src/data/apps
|
||||
sign-commits: true
|
||||
title: 'data: VirusTotal re-check'
|
||||
commit-message: 'data: refresh VirusTotal scans'
|
||||
labels: security
|
||||
body-path: ${{ runner.temp }}/vt-summary.md
|
||||
|
||||
# A PR opened with GITHUB_TOKEN gets `pull_request` runs that wait for a
|
||||
# maintainer's approval; `workflow_dispatch` always runs. Dispatch only
|
||||
# when the branch actually moved.
|
||||
- name: Run the required checks on the PR branch
|
||||
if: steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
BRANCH: ${{ steps.cpr.outputs.pull-request-branch }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh workflow run ci.yml --repo "$GITHUB_REPOSITORY" --ref "$BRANCH"
|
||||
gh workflow run codeql.yml --repo "$GITHUB_REPOSITORY" --ref "$BRANCH"
|
||||
|
||||
- name: Open one tracking issue per entry with detections
|
||||
if: github.ref == 'refs/heads/main' && steps.scan.outputs.review != ''
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
REVIEW_JSON: ${{ runner.temp }}/vt-review.json
|
||||
run: |
|
||||
set -euo pipefail
|
||||
jq -c '.[]' "$REVIEW_JSON" | while read -r row; do
|
||||
slug=$(jq -r '.slug' <<<"$row")
|
||||
# Same shape validate:data enforces on filenames; anything else is
|
||||
# not ours and must not reach a command or an issue title.
|
||||
if ! [[ "$slug" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
|
||||
echo "::warning::skipping unexpected slug '$slug'"
|
||||
continue
|
||||
fi
|
||||
title="[vt] $slug"
|
||||
# </dev/null: the loop's stdin is jq's output, which gh must not eat.
|
||||
open=$(gh issue list --repo "$GITHUB_REPOSITORY" --label security --state open \
|
||||
--json title --jq "map(select(.title == \"$title\")) | length" </dev/null)
|
||||
if [ "$open" != "0" ]; then
|
||||
echo "$title already tracked"
|
||||
continue
|
||||
fi
|
||||
evidence=$(jq -r '.evidence' <<<"$row")
|
||||
malicious=$(jq -r '.malicious' <<<"$row")
|
||||
suspicious=$(jq -r '.suspicious' <<<"$row")
|
||||
was=$(jq -r '.was' <<<"$row")
|
||||
now=$(jq -r '.status' <<<"$row")
|
||||
gh issue create --repo "$GITHUB_REPOSITORY" --title "$title" \
|
||||
--label security --body-file - <<EOF
|
||||
VirusTotal re-scanned \`$slug\`'s download page: **$malicious malicious, $suspicious suspicious** — [the scan]($evidence).
|
||||
|
||||
Status in the re-check PR: \`$was\` → \`$now\`. Nothing was flagged or removed (docs/09 §6).
|
||||
|
||||
Decide and record here:
|
||||
- [ ] Look at which engines said what, and whether the vendor or a second scan agrees
|
||||
- [ ] False positive → set \`status\` back to \`clean\` in a PR and note why here
|
||||
- [ ] Confirmed → \`status: "flagged"\` + \`pnpm quarantine\` in one PR (docs/03 §5)
|
||||
- [ ] Whether users were plausibly exposed (docs/13 §7)
|
||||
EOF
|
||||
done
|
||||
@@ -1,12 +0,0 @@
|
||||
# SonarCloud automatic analysis (project poli0981_softharbor).
|
||||
# https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/automatic-analysis/
|
||||
#
|
||||
# Sources stay rooted at the repo so workflow files under .github/ keep being
|
||||
# analysed (the githubactions rules found unpinned actions there). Tests are
|
||||
# split out so test files are judged by test rules, and the curated dataset is
|
||||
# excluded: it is CC BY-SA content validated by Zod + validate:data, not code.
|
||||
sonar.sources=.
|
||||
sonar.tests=.
|
||||
sonar.exclusions=src/data/**,data/**,docs/**,dist/**,coverage/**,node_modules/**,**/*.test.ts,**/*.test.mjs,e2e/**
|
||||
sonar.test.inclusions=**/*.test.ts,**/*.test.mjs,e2e/**
|
||||
sonar.cpd.exclusions=src/data/**,src/i18n/**
|
||||
@@ -4,6 +4,52 @@ All notable changes to SoftHarbor. The site is continuously deployed; a
|
||||
version marks a release announced in the repository (docs/13). Dates are
|
||||
UTC.
|
||||
|
||||
## [1.2.0] — 2026-10-23
|
||||
|
||||
Upkeep of everything behind the list — security checks that keep
|
||||
themselves current, a newer toolchain, deeper code analysis — and the
|
||||
catalogue's second batch.
|
||||
|
||||
### Security status — what changed
|
||||
|
||||
- **Re-checks are automatic now.** Every app's download page is re-scanned
|
||||
on VirusTotal at least every 90 days, and the date on its security line
|
||||
moves with it. Any warning moves an app back to "Unverified" and opens an
|
||||
issue for the maintainer to look at; nothing is ever marked safe or
|
||||
removed automatically. The note under "No known warnings" now says what
|
||||
it rests on: the published checklist when the app was listed, and a scan
|
||||
of its download page on the date shown.
|
||||
- The first runs re-scanned 197 of the earlier apps, including eight whose
|
||||
linked scan was of an older download link. Nine of them — 7-Zip, Android
|
||||
Studio, DBeaver, DevToys, Helium, itch, KeePassXC, LuLu and Meld — drew a
|
||||
single warning from one engine and show "Unverified" until the maintainer
|
||||
has looked at each one. The remaining apps follow automatically from
|
||||
28 October.
|
||||
|
||||
### Added
|
||||
|
||||
- **38 apps** in a second batch — screenshot, clipboard and window tools,
|
||||
package managers, file sharing and remote access, emulators, local AI,
|
||||
CAD and 3D printing. The [RSS feed](https://softharbor.net/rss.xml) lists
|
||||
each one. 30 of them carry "No known warnings"; 8 stay "Unverified" for
|
||||
now, each for a stated reason.
|
||||
- **Two categories:** Local AI and CAD & 3D (14 in all).
|
||||
|
||||
### Changed
|
||||
|
||||
- The AI Disclosure describes the automatic re-check and names the model
|
||||
used for this release.
|
||||
- Built and tested on **Node.js 26**; TypeScript files are now also
|
||||
type-checked by **TypeScript 7**, beside the TypeScript 6 that Astro's
|
||||
checker still needs.
|
||||
- **SonarQube Cloud** analyses every change from CI, with test coverage —
|
||||
which now also measures the build scripts and the in-page scripts.
|
||||
|
||||
### Fixed
|
||||
|
||||
- A malformed date in an app's data stopped the build with an unhelpful
|
||||
error instead of naming the field.
|
||||
|
||||
## [1.1.0] — 2026-10-21
|
||||
|
||||
A full review of the site after launch: security advisories closed, real
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> Root instruction file for AI-assisted development (Claude Code).
|
||||
> Read this first. Detailed specs live in `docs/00–16`.
|
||||
> Suite version: 1.3 (2026-10-21, site v1.1) · Author: poli0981 / SkullMute
|
||||
> Suite version: 2.0 (2026-10-21, site v1.1) · Author: poli0981 / SkullMute
|
||||
|
||||
## What this project is
|
||||
|
||||
@@ -19,8 +19,9 @@ googling every tool one by one.
|
||||
route disabled, PR previews only — see `docs/16`), deployed by Cloudflare
|
||||
Workers Builds when `main` changes. One tiny Worker answers
|
||||
`POST /api/verify` only (D25); no backend, no database.
|
||||
- Stack: Node 24 LTS · pnpm 11 · Astro 7 (static output) · Svelte 5 islands ·
|
||||
Tailwind CSS 4.3 · TypeScript strict · Wrangler 4 — full table in `docs/01`
|
||||
- Stack: Node 26 · pnpm 11 · Astro 7 (static output) · Svelte 5 islands ·
|
||||
Tailwind CSS 4.3 · TypeScript strict (TS 7 `tsc` beside the TS 6 API that
|
||||
`astro check` needs — D28) · Wrangler 4 — full table in `docs/01`
|
||||
|
||||
## Hard rules (never violate)
|
||||
|
||||
@@ -76,20 +77,22 @@ criteria (`docs/15`) are met.
|
||||
| **P3 — Static pages** | Welcome, `/apps`, `/apps/[slug]`, `/categories/[id]`, layouts, tokens, fonts, dark mode (no JS yet) | 02, 06 |
|
||||
| **P4 — Islands** | Search/filter/sort (MiniSearch + nanostores), language switcher, theme toggle, legal gate | 05, 06, 07, 14 |
|
||||
| **P5 — Resilience & outputs** | 404/offline/PWA, dormant error templates, `/api/apps.json`, `/rss.xml`, bug-report button | 03, 05, 08 |
|
||||
| **P6 — Ship** | `_headers`, CI/CD wiring, deploy, seed the app catalogue (326 as of 2026-07-30), launch checklist | 09, 10, 12, 13 |
|
||||
| **P6 — Ship** | `_headers`, CI/CD wiring, deploy, seed the app catalogue (326 as of 2026-07-30; 364 after batch 2, 2026-10-23), launch checklist | 09, 10, 12, 13 |
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
pnpm install # Node 24 LTS required (see .nvmrc / engines)
|
||||
pnpm install # Node 26 required (see .nvmrc / engines)
|
||||
pnpm dev # astro dev
|
||||
pnpm build # astro build → dist/
|
||||
pnpm preview # astro preview
|
||||
pnpm lint # eslint + prettier --check
|
||||
pnpm check # astro check (TS 6) + tsc --noEmit (TS 7)
|
||||
pnpm test # vitest run (unit, islands, scripts, worker)
|
||||
pnpm coverage # vitest run --coverage (thresholds in vitest.config.ts)
|
||||
pnpm e2e # playwright + axe against astro preview (build first)
|
||||
pnpm validate:data # node scripts/validate-data.mjs (L2 data rules)
|
||||
pnpm vt:recheck # VirusTotal re-check (needs VT_API_KEY; docs/12 §4b)
|
||||
pnpm i18n:check # node scripts/check-i18n-parity.mjs (EN/VI key parity)
|
||||
pnpm deploy # build + wrangler deploy (Workers Builds does this on main)
|
||||
```
|
||||
@@ -122,7 +125,7 @@ pnpm deploy # build + wrangler deploy (Workers Builds does this on m
|
||||
| `docs/09_SECURITY_PRIVACY.md` | Threat model, `_headers`/CSP, security.txt, data-vetting policy, privacy |
|
||||
| `docs/10_CODING_STANDARDS.md` | TS/ESLint/Prettier/Knip/lefthook, naming, commits, DoD |
|
||||
| `docs/11_TESTING.md` | Test pyramid, P0 spikes S1–S5, coverage targets |
|
||||
| `docs/12_CI_CD.md` | Workflows (validate/deploy/quarantine/link-check), `poli0981/.github` wiring, issue forms |
|
||||
| `docs/12_CI_CD.md` | Workflows (ci incl. SonarQube Cloud / quarantine / vt-recheck / link-check), `poli0981/.github` wiring, issue forms |
|
||||
| `docs/13_RELEASE.md` | Launch checklist, seed list, versioning, notify.py announcement |
|
||||
| `docs/14_LEGAL.md` | Licensing model, legal-gate spec, bilingual drafts (Disclaimer/Privacy/Terms/Trademarks/Third-party) |
|
||||
| `docs/15_ROADMAP.md` | Milestones, post-v1 backlog, decision log, open questions |
|
||||
|
||||
+13
-4
@@ -46,11 +46,13 @@ software we link to; take that to its own developer.
|
||||
advisory:
|
||||
|
||||
```bash
|
||||
pnpm lint && pnpm i18n:check && pnpm validate:data && pnpm test && pnpm check && pnpm build && pnpm check:styles && pnpm check:sw && pnpm knip
|
||||
pnpm lint && pnpm check && pnpm coverage && pnpm build && pnpm knip && pnpm e2e
|
||||
```
|
||||
|
||||
`check:styles` and `check:sw` inspect `dist/`, so they must run **after**
|
||||
`build`.
|
||||
`pnpm build` already runs the data and i18n gates before Astro and the
|
||||
`dist/` gates after it (`check:csp`, `check:assets`, `check:sw`,
|
||||
`check:feed`); `pnpm e2e` needs that build, and a one-time
|
||||
`pnpm exec playwright install chromium`.
|
||||
|
||||
Data lives in `src/data/apps/<slug>.json`, one file per app, validated by the
|
||||
Zod schema in `src/content.config.ts`. Summaries are written **from scratch**
|
||||
@@ -58,6 +60,13 @@ in both English and Vietnamese — that is what lets the dataset carry CC BY-SA
|
||||
at all. Vietnamese is reviewed by a native speaker; machine translation is not
|
||||
accepted.
|
||||
|
||||
A new entry starts as `"security": { "status": "unverified", "evidence": null,
|
||||
"checkedAt": "<today>" }`. You do not need a VirusTotal key: the maintainer
|
||||
dispatches `vt-recheck.yml` on the PR branch, which scans the new entry's
|
||||
download page and records the permalink, and only the maintainer moves an
|
||||
entry to `clean` (docs/09 §6). If you change an existing entry's
|
||||
`links.download`, the old scan no longer describes it — say so in the PR.
|
||||
|
||||
If you are unsure whether something is wanted, open a discussion first. A
|
||||
short question costs everyone less than a large rejected PR.
|
||||
|
||||
@@ -99,7 +108,7 @@ blocked:
|
||||
[/legal/ai-disclosure](https://softharbor.net/legal/ai-disclosure), and holds
|
||||
contributions to the same standard it holds itself.
|
||||
- **Drive-by or automated PRs** — whitespace, reformatting, badge additions,
|
||||
dependency bumps Renovate already owns, or bulk submissions for contribution
|
||||
dependency bumps Dependabot already owns, or bulk submissions for contribution
|
||||
counts.
|
||||
- **Vendor marketing copy or encyclopedia text** pasted as a summary. It breaks
|
||||
the licence provenance the dataset depends on.
|
||||
|
||||
@@ -11,7 +11,7 @@ The site hosts **no binaries**. It is a map, not a mirror.
|
||||
|
||||
## What is in it
|
||||
|
||||
**326 apps** across 12 categories, each one file in `src/data/apps/`. Every
|
||||
**364 apps** across 14 categories, each one file in `src/data/apps/`. Every
|
||||
entry carries:
|
||||
|
||||
- original two-line summaries in English _and_ Vietnamese — written from
|
||||
@@ -37,9 +37,9 @@ Control. The [Privacy Policy](https://softharbor.net/legal/privacy) has the
|
||||
details.
|
||||
|
||||
Astro 7 (static) · Svelte 5 islands · Tailwind CSS 4 · TypeScript strict ·
|
||||
Node 24 · pnpm 11 · Cloudflare Workers Static Assets (+ one Worker route).
|
||||
Node 26 · pnpm 11 · Cloudflare Workers Static Assets (+ one Worker route).
|
||||
Tested with Vitest (unit, islands, build scripts, the Worker) and Playwright +
|
||||
axe on the built site.
|
||||
axe on the built site; analysed by CodeQL and SonarQube Cloud.
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
@@ -56,9 +56,9 @@ pnpm i18n:check # EN/VI key parity
|
||||
pnpm validate:data # cross-file data rules the schema cannot see
|
||||
pnpm test # vitest
|
||||
pnpm check # astro check
|
||||
pnpm build
|
||||
pnpm check:styles # every emitted style is allowed by the page CSP
|
||||
pnpm check:sw # the service worker matches its spec
|
||||
pnpm build # includes the dist/ gates: CSP, assets, service worker, feed
|
||||
pnpm coverage # unit, island, build-script and Worker tests, with thresholds
|
||||
pnpm e2e # Playwright + axe against the built site
|
||||
pnpm knip # dead code and unused deps
|
||||
```
|
||||
|
||||
|
||||
+41
-21
@@ -1,9 +1,10 @@
|
||||
# 00 — Project Overview
|
||||
|
||||
> **Project:** SoftHarbor
|
||||
> **Doc suite version:** 1.2 (2026-07-27)
|
||||
> **Doc suite version:** 2.0 (2026-10-21, site v1.1)
|
||||
> **Author:** poli0981 / SkullMute · **License:** code GPL-3.0-only · data CC BY-SA 4.0
|
||||
> **Platform:** Web (static), Cloudflare Workers Static Assets, canonical `https://softharbor.net`
|
||||
> — plus one Worker route, `POST /api/verify` (D25)
|
||||
|
||||
## 1. Elevator pitch
|
||||
|
||||
@@ -30,8 +31,14 @@ is a curated map, not a mirror.
|
||||
3. **Trust through transparency, not promises.** License is shown as an SPDX
|
||||
badge when open source; security status is shown as *"no known warnings —
|
||||
checked <date>"*, never as a guarantee.
|
||||
4. **Zero tracking.** No analytics, no cookies, no third-party requests in
|
||||
v1. localStorage holds only user preferences.
|
||||
4. **No tracking of individuals.** No cookies, no ads, no accounts, nothing
|
||||
sold. *(v1.0 said "no analytics, no third-party requests"; amended
|
||||
2026-10-21.)* The only third-party requests are two Cloudflare services,
|
||||
both started by our own code and disclosed in the Privacy Policy:
|
||||
cookieless Web Analytics, which never loads under Global Privacy Control
|
||||
(D26), and the legal gate's Turnstile check, loaded only after the
|
||||
documents are accepted (D25). localStorage holds preferences and the
|
||||
gate's two records only (docs/09 §8).
|
||||
5. **Fast and tiny.** Static HTML, one small search island, self-hosted
|
||||
fonts. Target: < 80 KB JS on `/apps`, LCP < 1.5 s on mid-range mobile.
|
||||
6. **Bilingual parity.** EN and VI are equal citizens — every string, every
|
||||
@@ -79,22 +86,29 @@ consistent over time.
|
||||
| D4 | Data license | **CC BY-SA 4.0** (`src/data/**`) | 2026-07-15 | Copyleft spirit for the curated dataset; see docs/14 §1 |
|
||||
| D5 | Framework | Astro 7 static + Svelte 5 islands | 2026-07-15 | Zod-validated content collections, built-in i18n routing, ~0 JS baseline |
|
||||
| D6 | Styling | Tailwind CSS 4.3.x | 2026-07-15 | Current stable line |
|
||||
| D7 | Runtime | Node 24 LTS (Krypton) | 2026-07-15 | Active LTS; Node 26 not LTS until 2026-10 |
|
||||
| D7 | Runtime | Node 24 LTS (Krypton) — *amended 2026-10-23: **Node 26** (`.nvmrc` `26`, engines `>=26 <27`, `@types/node` 26), taken five days before its LTS promotion on 2026-10-28 at the owner's request; Node 24 entered maintenance on 2026-10-20* | 2026-07-15 | Active LTS; Node 26 not LTS until 2026-10 |
|
||||
| D8 | Search | MiniSearch, client-side, VN-insensitive normalizer | 2026-07-15 | Lightweight; dataset ≤ ~1 000 entries |
|
||||
| D9 | Fonts | Bricolage Grotesque (display) · Be Vietnam Pro (body) · IBM Plex Mono (badges) | 2026-07-15 | All ship Vietnamese subsets; distinctive, non-generic |
|
||||
| D10 | Security field | `status/evidence/checkedAt` model — never boolean "virus: no" | 2026-07-15 | Legal defensibility; honesty |
|
||||
| D11 | Flagged handling | Quarantine folder + issue, never delete | 2026-07-15 | Audit trail, restorable |
|
||||
| D12 | Legal gate | First-visit overlay, `sh:legal` versioned in localStorage | 2026-07-15 | CommandForge pattern adapted to web |
|
||||
| D12 | Legal gate | First-visit overlay, `sh:legal` versioned in localStorage — *amended 2026-10-21: a second step, the Turnstile human check (D25), `sh:human`* | 2026-07-15 | CommandForge pattern adapted to web |
|
||||
| D13 | Locale routing | `en` default unprefixed, `vi` at `/vi/…`, **no auto-redirect** | 2026-07-15 | SEO-safe; a dismissible banner suggests VI instead (docs/07 §5) |
|
||||
| D14 | Analytics | None in v1 | 2026-07-15 | Simplest honest privacy policy |
|
||||
| D14 | Analytics | None in v1 | 2026-07-15 | ⛔ **superseded 2026-10-21 by D26** — Simplest honest privacy policy |
|
||||
| D15 | Cross-island state | nanostores — **`nanostores` alone** (amended 2026-07-27: `@nanostores/svelte` does not exist and is not needed; atoms already satisfy Svelte's store contract) | 2026-07-27 | Astro-recommended, ~1 KB |
|
||||
| D16 | `developer` field | **Required** in the schema and rendered on the detail page | 2026-07-27 | Lets a reader match "who makes this" against the domain they're about to click — the same trust proposition as "official links only" (docs/04 §2, docs/06 §5) |
|
||||
| D17 | Package manager | **pnpm 10** kept, though sibling org projects use npm | 2026-07-27 | `reusable-web-react.yml` accepts `package-manager: pnpm`, so nothing is lost; docs/09 §7's `ignore-scripts` + `--frozen-lockfile` posture stays intact |
|
||||
| D17 | Package manager | **pnpm 10** kept, though sibling org projects use npm — *amended: the line is **pnpm 11** since P1 (`packageManager: pnpm@11.15.1`); `ignore-scripts` was dropped for `allowBuilds` (docs/09 §7)* | 2026-07-27 | `reusable-web-react.yml` accepts `package-manager: pnpm`, so nothing is lost; docs/09 §7's `ignore-scripts` + `--frozen-lockfile` posture stays intact |
|
||||
| D18 | CSP / inline scripts | Zero inline scripts → plain `script-src 'self'` | 2026-07-27 | ⛔ **superseded by D20 the same week** — S1 proved it unachievable: Astro's island hydration emits inline scripts on any page with a `client:*` directive |
|
||||
| D20 | CSP (actual) | **Split policy.** `script-src`/`style-src` come from Astro's `security.csp` per-page `<meta>` with generated hashes; `_headers` carries **only** `frame-ancestors 'none'` | 2026-07-27 | Header CSP and meta CSP are enforced as two policies and a resource must pass both — so `_headers` must not also declare script-src or the intersection kills Astro's hashes. Theme snippet still externalised to `public/theme.js`. Verified by recomputing every inline hash against the emitted policy (docs/09 §4) |
|
||||
| D21 | TypeScript major | **Hold at 6.x**; do not adopt TS 7 | 2026-07-27 | TS 7's native compiler does not expose the API `astro check` needs, so `pnpm check` fails on it (docs/01 §2) |
|
||||
| D20 | CSP (actual) | **Split policy.** `script-src`/`style-src` come from Astro's `security.csp` per-page `<meta>` with generated hashes; `_headers` carries **only** `frame-ancestors 'none'` — *amended 2026-10-21: the meta tag is moved first in `<head>`, the head scripts are hashed `/_astro/` files from `src/scripts/`, the policy adds exactly the two Cloudflare origins of D25/D26 and one style hash, and `check:csp` gates the build* | 2026-07-27 | Header CSP and meta CSP are enforced as two policies and a resource must pass both — so `_headers` must not also declare script-src or the intersection kills Astro's hashes. Theme snippet still externalised to `public/theme.js` (since v1.1: `src/scripts/theme.js`). Verified by recomputing every inline hash against the emitted policy (docs/09 §4) |
|
||||
| D21 | TypeScript major | **Hold at 6.x**; do not adopt TS 7 — *amended 2026-10-23: TS 6 and TS 7 side by side. `typescript` is the `@typescript/typescript6` wrapper — the TS 6 API that `astro check`, typescript-eslint and svelte2tsx load — and `@typescript/native` is TS 7, whose `tsc --noEmit` checks every `.ts` file in `pnpm check` (docs/01 §2)* | 2026-07-27 | TS 7's native compiler does not expose the API `astro check` needs, so `pnpm check` fails on it (docs/01 §2) |
|
||||
| D22 | Search fuzziness | `FUZZY = 0.25`; the `gmip → GIMP` vector is retired | 2026-07-27 | Measured, not guessed: `gmip` needs 2 edits on 4 chars (fuzzy ≥ 0.375), and at that setting the *correctly spelled* query `gimp` stops being exact. Precision on correct spellings beats one contrived typo (docs/05 §A2) |
|
||||
| D19 | Suite correctness | Spec claims about external systems are **verified against the real system** before they enter the docs | 2026-07-27 | The 2026-07-27 audit found two ops-repo workflows that never existed and four stale tool majors — all cheap to catch on paper, all expensive to catch in CI |
|
||||
| D23 | Logo fallback | Third `logo` form `monogram` (initials) when no brand mark is available | 2026-07-29 | Simple Icons covers only part of the catalogue; docs/14 §3d sanctions no other source than the vendor's own assets (docs/15 §4) |
|
||||
| D24 | Seed import | The seed batch was exempt from one-app-per-PR | 2026-07-29 | 286 machine-uniform files; the rule resumes for every later entry (docs/15 §4) |
|
||||
| D25 | Server code | **One Worker, for `POST /api/verify` only** (amends hard rule 1): the legal gate's step 2 — Turnstile after acceptance, token checked server-side, rate-limited, everything fails **open**; `run_worker_first` keeps pages and assets on the unbilled asset path | 2026-10-21 | Consent-first human check on a public site without ever locking a person out (docs/09 §4a, docs/08 Part E) |
|
||||
| D26 | Analytics | **Cloudflare Web Analytics, honouring Global Privacy Control** (supersedes D14; amends hard rule 7): cookieless beacon, never under GPC, production host only | 2026-10-21 | Knowing whether the site works and is used, with the least data and a privacy signal honoured (docs/09 §8) |
|
||||
| D27 | Contacts | **One address per purpose at `@poli0981.dev`** — `src/lib/contacts.ts`; `contact@softharbor.net` retired; mail hosted by Google | 2026-10-21 | A message reaches the right queue; `sponsor@` deliberately unused (docs/14 Part 2) |
|
||||
| D28 | Toolchain | **Node 26 + TypeScript 6/7 side by side** (amends D7 and D21) — `.nvmrc` 26; `typescript` = the `@typescript/typescript6` API wrapper, `@typescript/native` = TS 7, whose `tsc --noEmit` now type-checks every `.ts` file in `pnpm check` | 2026-10-23 | Node 24 entered maintenance 2026-10-20; TS 7 ships no API yet, which astro check, typescript-eslint and svelte2tsx need (docs/01 §2) |
|
||||
| D29 | Code analysis | **SonarQube Cloud CI-based analysis with coverage** (`ci.yml` `sonar` job, not a required check) replaces Automatic Analysis | 2026-10-23 | Automatic Analysis cannot import coverage; a CI scan measures the same lcov the ratchet gates (docs/12 §2, docs/11 §1) |
|
||||
|
||||
## 6. Identifiers (locked)
|
||||
|
||||
@@ -102,14 +116,15 @@ consistent over time.
|
||||
|---|---|
|
||||
| Repo slug | `poli0981/softharbor` |
|
||||
| Canonical origin | `https://softharbor.net` (apex; `www` 301s to it) |
|
||||
| Worker name | `softharbor` (workers.dev route disabled; versioned preview URLs only — docs/16 §3) |
|
||||
| Contact email | `contact@softharbor.net` via Cloudflare Email Routing (docs/16 §6) |
|
||||
| Component prefix | `Sh*` |
|
||||
| Worker name | `softharbor` — code in `worker/`, one endpoint `POST /api/verify` (D25); workers.dev route disabled; versioned preview URLs only (docs/16 §3) |
|
||||
| Contact email | One address per purpose at `@poli0981.dev` — `src/lib/contacts.ts`, page `/contact` (D27; `contact@softharbor.net` retired) |
|
||||
| Component prefix | `Sh*` (islands: `ShLegalGate`, `ShSearch`, `ShFilterSheet`, `ShLangSwitch`, `ShPrefs`, `ShBugReport`) |
|
||||
| CSS custom property prefix | `--sh-*` |
|
||||
| localStorage keys | `sh:legal`, `sh:lang`, `sh:theme` |
|
||||
| localStorage keys | `sh:legal`, `sh:human`, `sh:lang`, `sh:theme`, `sh:scrollbar`, `sh:motion` |
|
||||
| App data path | `src/data/apps/<slug>.json` (filename = slug) |
|
||||
| Quarantine path | `data/quarantine/<slug>.json` |
|
||||
| Public data endpoints | `/api/apps.json`, `/rss.xml`, `/sitemap-index.xml` |
|
||||
| Runtime secret | `TURNSTILE_SECRET` (Worker runtime secret, never in the repo — docs/08 Part E) |
|
||||
|
||||
## 7. Non-goals (v1)
|
||||
|
||||
@@ -118,7 +133,10 @@ binary · automatic scraping of vendor metadata (all entries are hand-written)
|
||||
· mobile-app listings · package-manager command snippets (winget/brew —
|
||||
post-v1 backlog) · zone security add-ons kept deliberately OFF at launch:
|
||||
rate limiting, Bot Fight Mode, paid Custom Errors (reasons & activation
|
||||
recipes in docs/16 §9) · a third locale (JP is a v1.2 candidate, docs/15).
|
||||
recipes in docs/16 §9 — the Worker's own rate-limit binding on
|
||||
`/api/verify` is not a zone feature) · server-rendered or gated pages of
|
||||
any kind (D25 allows one verification endpoint, nothing more) · a third
|
||||
locale (JP is a v1.2 candidate, docs/15).
|
||||
|
||||
## 8. Document map
|
||||
|
||||
@@ -131,11 +149,13 @@ See `CLAUDE.md` for the full table. Reading order for a new contributor:
|
||||
|---|---|---|
|
||||
| H1 | Create repo `poli0981/softharbor`, default branch `main`, add GPL-3.0 LICENSE via GitHub picker | P1 |
|
||||
| H2 | Onboard the `softharbor.net` zone: add to Cloudflare (Free plan), set nameservers at the registrar (skip if Cloudflare Registrar), enable DNSSEC + transfer lock + auto-renew (docs/16 §2) | P1 |
|
||||
| H3 | Create Cloudflare API token ("Edit Cloudflare Workers" template) and add `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` repo secrets | P6 |
|
||||
| H4 | Enable GitHub *Private vulnerability reporting* + *Issues* on the repo | P6 |
|
||||
| H5 | Set up Email Routing → `contact@softharbor.net` + DMARC record, then fill `<contact-email>` in docs/14 drafts and security.txt (docs/16 §6) | P6 |
|
||||
| H6 | Review & approve all legal drafts in docs/14 before first public deploy | P6 |
|
||||
| H3 | ~~Create Cloudflare API token … and add `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` repo secrets~~ — **retired 2026-07-28**: Workers Builds deploys; delete the unused secrets (docs/12 §1) | — |
|
||||
| H4 | Enable GitHub *Private vulnerability reporting* + *Issues* on the repo (the issue forms and `SECURITY.md` route reports there — ⚠ verify the setting) | P6 |
|
||||
| H5 | ~~Set up Email Routing → `contact@softharbor.net` + DMARC~~ — **superseded 2026-10-21 by D27**: purpose addresses at `@poli0981.dev`, Google-hosted. Still open: decide whether softharbor.net keeps its Email Routing records (docs/16 §6) | v1.1 |
|
||||
| H6 | Review & approve all legal drafts in docs/14 before first public deploy — ✅ 2026-07-28; sign-off on the 2026-10-21 rewrite ⚠ verify (docs/14 Part 4) | P6 / v1.1 |
|
||||
| H7 | Approve the seed list — **326 apps imported 2026-07-29** (docs/13 §4, D24) | P6 |
|
||||
| H8 | Create the GSC **Domain property** for `softharbor.net` (DNS TXT verify) + enable Crawler Hints; submit sitemap & import to Bing at launch (docs/16 §8) | P6 |
|
||||
| H9 | Decide on HSTS phase P3 (`preload` submission — semi-irreversible, docs/16 §5) | post-launch |
|
||||
| H10 | Enable *Settings → Actions → General → **Allow GitHub Actions to create and approve pull requests*** — without it the nightly quarantine sweep cannot open its PR and hard rule 5 stops being enforced mechanically (docs/12 §4) | P6 |
|
||||
| H8 | Create the GSC **Domain property** for `softharbor.net` (DNS TXT verify) + enable Crawler Hints; submit sitemap & import to Bing at launch (docs/16 §8) — the verification TXT is published (observed 2026-10-21); the rest ⚠ verify | P6 |
|
||||
| H9 | Decide on HSTS phase P3 (`preload` submission — semi-irreversible, docs/16 §5) — the header already carries `preload` (observed 2026-10-21, docs/15 §5) | post-launch |
|
||||
| H10 | Enable *Settings → Actions → General → **Allow GitHub Actions to create and approve pull requests*** — without it the nightly quarantine sweep cannot open its PR and hard rule 5 stops being enforced mechanically (docs/12 §4) — ✅ enabled | P6 |
|
||||
| H11 | Set the Worker's runtime secret **`TURNSTILE_SECRET`** (dashboard → Variables and Secrets, or `wrangler secret put`) — without it every check answers 503 and the gate silently fails open for everyone (docs/08 Part E) — ✅ set (verified 2026-10-21: a junk token gets `403 rejected`); redo whenever the Worker is re-created | v1.1 |
|
||||
| H12 | Turn the zone's **Speed Brain** off — Cloudflare refuses speculative prefetch on Worker requests (503); production still sent a `Speculation-Rules` header on 2026-10-21 (docs/16 §9) | v1.1 |
|
||||
+62
-27
@@ -1,8 +1,9 @@
|
||||
# 01 — Tech Stack (verified 2026-07-15 · re-verified 2026-07-27)
|
||||
# 01 — Tech Stack (verified 2026-07-15 · re-verified 2026-07-27 · updated 2026-10-21)
|
||||
|
||||
> All version lines below were checked against upstream release channels on
|
||||
> **2026-07-15**. Install the latest patch within each stated line. Renovate
|
||||
> keeps them current afterwards (§5).
|
||||
> **2026-07-15**. Install the latest patch within each stated line.
|
||||
> Dependabot keeps them current afterwards (§5) — it replaced Renovate on
|
||||
> 2026-10-21; Renovate was never installed and never ran.
|
||||
>
|
||||
> **Re-verified 2026-07-27** against `E:\poli0981-dev\package.json` — the
|
||||
> org's closest sibling project, already shipping Astro 7 on Cloudflare
|
||||
@@ -10,29 +11,44 @@
|
||||
> **TypeScript, ESLint, lefthook and knip were all a major behind** and have
|
||||
> been corrected below. Prefer that project's `package.json` as the reference
|
||||
> when scaffolding — it is a working install, not a claim.
|
||||
>
|
||||
> **Installed at v1.1 (2026-10-21, from `node_modules`):** Node 24.19 ·
|
||||
> pnpm 11.15.1 · Astro 7.4.1 · Svelte 5.57.2 · `@astrojs/svelte` 9.1.0 ·
|
||||
> Tailwind 4.3.3 · TypeScript 6.0.3 · MiniSearch 7.2.0 · nanostores 1.5.5 ·
|
||||
> `@vite-pwa/astro` 1.2.0 · `unplugin-icons` 24.0.0 · Vitest 5.0.5 ·
|
||||
> Playwright 1.64.1 · `@axe-core/playwright` 4.14.0 · happy-dom 21.0.3 ·
|
||||
> Wrangler 4.151.3 · ESLint 10.13 · `typescript-eslint` 8.72 · Prettier
|
||||
> 3.9 · knip 6.42 · lefthook 2.2.2. `package.json` is the authority; this
|
||||
> line is a snapshot.
|
||||
>
|
||||
> **Changed for v1.2 (2026-10-23):** Node 26.12 · `@types/node` 26.6 ·
|
||||
> TypeScript 7.0.2 (`tsc`, as `@typescript/native`) beside 6.0.3 (the API, via
|
||||
> `@typescript/typescript6` 6.0.2) · SonarScanner CLI 8.2 through
|
||||
> `sonarqube-scan-action` 8.3.
|
||||
|
||||
## 1. Runtime & toolchain
|
||||
|
||||
| Layer | Package | Line (2026-07-15) | Notes |
|
||||
|---|---|---|---|
|
||||
| Runtime | Node.js | **24 LTS "Krypton"** (24.x) | Active LTS; maintenance until 2028-04. Node 26 is Current only — do not use until it reaches LTS (2026-10). Pin via `.nvmrc` = `24` and `"engines": { "node": ">=24 <25" }`. |
|
||||
| Package manager | pnpm | **11.x** (`11.15.1` verified in P1) | `packageManager` field pinned. **Do not set `ignore-scripts`** — pnpm ≥ 10 already blocks dependency install scripts and wants an `allowBuilds` allowlist in `pnpm-workspace.yaml` instead (docs/09 §7). |
|
||||
| Deploy CLI | Wrangler | **4.x** (latest) | Only `deploy` / `versions upload` are used; no local Worker runtime needed (pure assets). |
|
||||
| Runtime | Node.js | **26** (26.12 at v1.2; was 24 LTS "Krypton" until 2026-10-23) | LTS from 2026-10-28, maintenance from 2027-10, end of life 2029-04. Taken five days before the LTS label at the owner's request (D7 amended) — Node 24 had entered maintenance on 2026-10-20, and CI, the e2e suite and a Workers Builds preview all passed on 26 first. Pin via `.nvmrc` = `26` and `"engines": { "node": ">=26 <27" }`; CI and Workers Builds read `.nvmrc`, and `@types/node` majors are held to the same line (Dependabot ignore, §5). **Node 25+ ships no Corepack**: a laptop whose `pnpm` came from Corepack needs `npm install -g corepack` (or a standalone pnpm) after upgrading, or `pnpm` and the lefthook hooks stop working. |
|
||||
| Package manager | pnpm | **11.x** (`11.15.1`, `packageManager`) | `packageManager` field pinned; CI's `pnpm/action-setup` reads it (no `version:`), so CI, Dependabot, Workers Builds and laptops run the same pnpm. **Do not set `ignore-scripts`** — pnpm ≥ 10 already blocks dependency install scripts and wants an `allowBuilds` allowlist in `pnpm-workspace.yaml` instead (docs/09 §7). pnpm 11's default **24 h `minimumReleaseAge`** refuses day-old releases — hence Dependabot's 2-day cooldown (§5). |
|
||||
| Deploy CLI | Wrangler | **4.x** (4.151 at v1.1) | Workers Builds runs `npx wrangler deploy` (main) and `wrangler versions upload` (PRs); CI runs `wrangler deploy --dry-run` to bundle `worker/` and validate `wrangler.jsonc`. Since D25 there **is** a Worker script (`worker/index.ts`), tested under Vitest in Node — the local `workerd` runtime stays blocked in `allowBuilds` (docs/09 §7). Types for the Worker are written by hand (`worker/env.ts`), not `@cloudflare/workers-types`. |
|
||||
|
||||
## 2. Framework & UI
|
||||
|
||||
| Layer | Package | Line | Notes |
|
||||
|---|---|---|---|
|
||||
| Framework | `astro` | **7.0.x** (≥ 7.0.9) | Static output. Ships Vite 8 + Rolldown (Rust bundler). Content Layer + Zod validation is the backbone of the data pipeline. |
|
||||
| Islands | `svelte` + `@astrojs/svelte` | Svelte **5.x** | Runes mode. Only 6 islands exist (docs/02 §5). |
|
||||
| Framework | `astro` | **7.x** (7.0.9 at P1; 7.4.1 at v1.1) | Static output. Ships Vite 8 + Rolldown (Rust bundler). Content Layer + Zod validation is the backbone of the data pipeline. `security.csp` provides the per-page meta policy (docs/09 §4); `<ClientRouter />` is **not** used — Astro does not support it with `security.csp` (docs/02 §6). |
|
||||
| Islands | `svelte` + `@astrojs/svelte` | Svelte **5.x** (5.57 at v1.1) | Runes mode. Only 6 islands exist (docs/02 §5). |
|
||||
| Styling | `tailwindcss` + `@tailwindcss/vite` | **4.3.x** (≥ 4.3.2) | CSS-first config via `@theme`; tokens in docs/06 §2. |
|
||||
| Language | `typescript` | **6.x — pinned, do not take 7** | `strict` + `noUncheckedIndexedAccess` (docs/10 §1). **TypeScript 7's native compiler does not expose the programmatic API `astro check` needs**, so `pnpm check` fails outright on it (reproduced in P1, 2026-07-27; upstream tracking: withastro/roadmap discussion 1321). Renovate must not bump this major until Astro says so — see §5.4. |
|
||||
| Language | `typescript` + `@typescript/native` | **6.x API + 7.x compiler, side by side** (since 2026-10-23) | `strict` + `noUncheckedIndexedAccess` (docs/10 §1). TypeScript 7's native compiler still ships no programmatic API, and `astro check` (its language server asserts `ts.findConfigFile`/`ts.sys`), typescript-eslint's project service and svelte2tsx all load one — so Microsoft's documented pair is used: `"typescript": "npm:@typescript/typescript6@^6"` (re-exports TS 6; bin `tsc6`) and `"@typescript/native": "npm:typescript@^7"` (bin `tsc`). `pnpm check` = `astro check` (TS 6, `.astro` files) **then** `tsc --noEmit` (TS 7, every `.ts` file — which nothing type-checked before: astro check reports `.astro` diagnostics only). `.svelte` script blocks are still checked by nothing. A TS 7-only setup waits on Astro (withastro/astro #18471, roadmap discussion 1321) and typescript-eslint (#10940). Dependabot ignores both majors (§5.4). |
|
||||
| State | `nanostores` **only** | 1.x | Cross-island filter/search state (~1 KB). **There is no `@nanostores/svelte` package** — it returns 404 on the registry (verified in P1, 2026-07-27). None is needed: a nanostores atom already satisfies Svelte's store contract (`.subscribe(cb)` fires immediately and returns an unsubscribe), so `$atom` auto-subscription works directly. Bindings exist for React/Vue/Solid/Preact/Lit/Angular precisely because those frameworks lack that contract. |
|
||||
| Search | `minisearch` | **7.x** | Client-side index; options in docs/05 §A2. |
|
||||
| Icons | `unplugin-icons` + `@iconify-json/simple-icons` + `@iconify-json/lucide` | latest | Simple Icons = app logos (SVG, CC0 set — trademark caveat in docs/14 §3d); Lucide = UI icons. Build-time inlined; nothing fetched at runtime. |
|
||||
| Fonts | `@fontsource-variable/bricolage-grotesque`, `@fontsource/be-vietnam-pro`, `@fontsource/ibm-plex-mono` | latest | Import `latin` + `vietnamese` subsets only. |
|
||||
| PWA / offline | `@vite-pwa/astro` | latest | Offline fallback page only — not a full precache PWA (docs/08 §D). |
|
||||
| Search | `minisearch` | **7.x** | Client-side index; options in docs/05 §A2. Loaded with a dynamic `import()` on first search, so it is not in any page's static bundle. |
|
||||
| Icons | `unplugin-icons` + `@iconify-json/simple-icons` + `@iconify-json/lucide` | latest | Simple Icons = app logos (SVG, CC0 set — trademark caveat in docs/14 §3d); Lucide = UI icons. In islands: `~icons/lucide/<name>` via `unplugin-icons` (`compiler: 'svelte'`). In `.astro`: `ShIcon.astro` / `src/lib/icon.ts`, which read the same vendored JSON at build time (data-driven names cannot be static imports). Nothing fetched at runtime. |
|
||||
| Fonts | `@fontsource-variable/bricolage-grotesque`, `@fontsource/be-vietnam-pro`, `@fontsource/ibm-plex-mono` | latest | `latin` + `vietnamese` subsets only (Bricolage's single stylesheet relies on `unicode-range`, docs/06 §3). |
|
||||
| PWA / offline | `@vite-pwa/astro` | 1.2.x | Installable (manifest linked, PNG icons) with an offline fallback page — not a full precache PWA (docs/08 Part D). Its peer range stops at Astro 5; accepted explicitly in `pnpm-workspace.yaml` because `check:sw` proves the output every build. |
|
||||
| Feeds & SEO | `@astrojs/rss`, `@astrojs/sitemap` | latest | `/rss.xml` (new apps) + sitemap with hreflang. |
|
||||
| Third-party runtime (not packages) | Cloudflare Web Analytics beacon · Cloudflare Turnstile `api.js` | — | Loaded by our own code from their origins — the only third-party requests (hard rule 7, D25/D26, docs/09 §4). |
|
||||
|
||||
## 3. Quality tooling
|
||||
|
||||
@@ -41,11 +57,13 @@
|
||||
| Lint | `eslint` **10.x** flat config + `typescript-eslint` 8.x + `eslint-plugin-astro` 3.x + `eslint-plugin-svelte` 3.x | latest |
|
||||
| Format | `prettier` 3.x + `prettier-plugin-astro` + `prettier-plugin-svelte` + `prettier-plugin-tailwindcss` | latest |
|
||||
| Dead code | `knip` | **6.x** |
|
||||
| Unit tests | `vitest` | latest line compatible with the toolchain (Vitest bundles its own Vite — no conflict with Astro's Vite 8; confirm in spike S1) |
|
||||
| Unit / island / script / Worker tests | `vitest` + `@vitest/coverage-v8` + `happy-dom` | **5.x** (5.0.5) — four projects, coverage ratchet (docs/11 §1) |
|
||||
| End-to-end + a11y | `@playwright/test` + `@axe-core/playwright` | 1.64 / 4.14 — Chromium, desktop + Pixel 7 (docs/11 §5) |
|
||||
| Icon generation | `sharp` (dev only, `pnpm icons`) | 0.35 — output committed, builds never need it |
|
||||
| Git hooks | `lefthook` | **2.x** |
|
||||
| Link checking (CI) | `lychee` via `lycheeverse/lychee-action` | v2 line |
|
||||
| Dep updates | Renovate app | config in docs/12 §6 |
|
||||
| CVE scan | `osv-scanner` action + `pnpm audit` | latest |
|
||||
| Link checking (CI) | `lychee` via `lycheeverse/lychee-action` | v2 line (v2.9.0) |
|
||||
| Dep updates | **Dependabot** (`.github/dependabot.yml`) | npm + github-actions, weekly — docs/12 §6 (replaced the never-installed Renovate) |
|
||||
| CVE / code scanning | `osv-scanner` action + `pnpm audit --prod`; CodeQL (org reusable workflow); SonarQube Cloud **CI-based** analysis with coverage (`ci.yml` `sonar` job, `sonarqube-scan-action` 8.3, CLI 8.2 — docs/12 §2) | latest |
|
||||
|
||||
## 4. Rationale for the contested picks
|
||||
|
||||
@@ -69,21 +87,33 @@ rendered HTML and is the right tool only if the dataset grows 10×.
|
||||
|
||||
**No `@astrojs/cloudflare` adapter.** The adapter exists for SSR on Workers.
|
||||
SoftHarbor is 100 % prerendered, so `astro build` → `dist/` → Workers Static
|
||||
Assets needs no adapter, no Worker script, and no runtime billing.
|
||||
Assets needs no adapter. The one Worker of D25 (`worker/`) is a small
|
||||
hand-written module that Wrangler bundles beside the assets; it runs only
|
||||
for `assets.run_worker_first` paths (`/api/verify`), so pages stay on the
|
||||
unbilled asset path and no SSR exists.
|
||||
|
||||
## 5. Version & CVE policy
|
||||
|
||||
1. **Install latest stable within each line above; never pre-releases.**
|
||||
2. Renovate runs weekly (grouped minor/patch, separate majors) and pins
|
||||
GitHub Actions to commit SHAs.
|
||||
3. `osv-scanner` + `pnpm audit --prod` run on every PR; a *critical* finding
|
||||
with no patched version blocks merge and opens a tracking issue.
|
||||
4. Node upgrades follow LTS promotions only (next window: Node 26 → LTS
|
||||
2026-10; adopt after CI passes on it). **TypeScript is exempt from rule 1
|
||||
until Astro supports TS 7** (§2) — hold at 6.x and keep the major on
|
||||
Renovate's dashboard-approval list.
|
||||
2. **Dependabot** runs weekly (Monday), npm and github-actions, with a
|
||||
2-day cooldown (pnpm 11's 24 h `minimumReleaseAge`); minor + patch are
|
||||
grouped, majors arrive one PR each. GitHub Actions stay pinned to commit
|
||||
SHAs with a version comment, and Dependabot bumps both (docs/12 §6).
|
||||
3. `osv-scanner` + `pnpm audit --prod` run on every PR and push to `main`
|
||||
(`ci.yml` `gates` job); a finding fails it. A finding with no patched
|
||||
release of the direct dependency is fixed with an `overrides` floor in
|
||||
`pnpm-workspace.yaml`, the advisory ids in a comment (docs/09 §7), or a
|
||||
tracking issue.
|
||||
4. Node upgrades follow LTS lines, adopted once CI, the e2e suite and a
|
||||
Workers Builds preview pass on them; `@types/node` moves with `.nvmrc` and
|
||||
Dependabot ignores its majors in between. (Node 26 was taken on
|
||||
2026-10-23, five days before its LTS promotion — the owner's call, D7.)
|
||||
**TypeScript is exempt from rule 1 while Astro needs the TS 6 API** (§2):
|
||||
`typescript` stays the TS 6 wrapper and `@typescript/native` is TS 7;
|
||||
Dependabot ignores both majors (D21).
|
||||
5. Every dependency bump that touches Astro/Vite/Tailwind majors must re-run
|
||||
spike S1 (docs/11 §3) before merge.
|
||||
spike S1 (docs/11 §3) before merge — in practice, the full CI including
|
||||
the e2e suite on the built site.
|
||||
|
||||
## 6. Known risk — Astro 7 freshness
|
||||
|
||||
@@ -93,3 +123,8 @@ weekly. Risk: a plugin in §2 misbehaves under Rolldown.
|
||||
- **Mitigation:** spike S1 compiles the *entire* integration set on day one.
|
||||
- **Fallback (pre-approved):** pin `astro@6.5.x` + its bundled Vite; no other
|
||||
stack change. Record the fallback in the decision log if taken.
|
||||
- **Outcome:** S1 passed on 7.1.3 (2026-07-27); the fallback was never
|
||||
needed, and the site runs 7.4.1 at v1.1. One Astro behaviour shaped the
|
||||
architecture since: `<ClientRouter />` is unsupported together with
|
||||
`security.csp`, so v1.1 moved to native cross-document View Transitions
|
||||
(docs/02 §6).
|
||||
+245
-90
@@ -2,102 +2,160 @@
|
||||
|
||||
## 1. Shape of the system
|
||||
|
||||
Fully static. The repository *is* the database; a deploy *is* a data
|
||||
migration.
|
||||
Static-first. The repository *is* the database; a deploy *is* a data
|
||||
migration. Everything a visitor reads is a prebuilt static asset; since
|
||||
v1.1 one small Worker answers exactly one endpoint (D25).
|
||||
|
||||
```
|
||||
maintainer PR ──▶ GitHub main ──▶ CI (astro build + checks)
|
||||
│ dist/
|
||||
maintainer PR ──▶ CI (ci.yml build + gates, codeql) ──▶ squash to main
|
||||
│
|
||||
Cloudflare Workers Builds ◀─────────────┘
|
||||
(pnpm run build → npx wrangler deploy; docs/12 §3)
|
||||
│ dist/ + worker/
|
||||
▼
|
||||
wrangler deploy → Cloudflare Workers Static Assets
|
||||
│ (no Worker script, requests unbilled)
|
||||
Cloudflare Workers Static Assets — softharbor.net
|
||||
pages, assets, feeds ─▶ asset server (unbilled)
|
||||
POST /api/verify ─────▶ worker/index.ts (D25)
|
||||
│
|
||||
▼
|
||||
Browser
|
||||
static HTML/CSS + 6 Svelte islands (client JS)
|
||||
search index & app JSON fetched from same origin
|
||||
third-party, started only by our own code (rule 7):
|
||||
Cloudflare Web Analytics beacon (D26, never under GPC)
|
||||
Cloudflare Turnstile (gate step 2, after acceptance)
|
||||
```
|
||||
|
||||
Consequences (accepted, documented):
|
||||
|
||||
- No server-side anything: no SSR, no API routes at runtime, no rate
|
||||
limiting of our own, no server logs beyond Cloudflare's dashboard metrics.
|
||||
- No SSR, no database, no page ever produced by server code. The only
|
||||
server code is `worker/`, which answers `POST /api/verify` (the legal
|
||||
gate's Turnstile check) and runs only for the paths in
|
||||
`assets.run_worker_first`; every page, asset and feed is served by the
|
||||
asset server without invoking it (§7, docs/08 Part E).
|
||||
- "Dynamic" behaviors are relocated: data mutation → Git + GitHub Actions;
|
||||
personalization → localStorage; search → client-side index.
|
||||
- 403/429 cannot originate from us in v1 — the zone's security features
|
||||
(rate limiting, Bot Fight Mode) are deliberately OFF (docs/16 §9);
|
||||
templates exist but are dormant (docs/08 §C).
|
||||
personalization → localStorage; search → client-side index; shareable
|
||||
view state → the URL (docs/05 §A3).
|
||||
- Logs: Cloudflare's dashboard metrics for the site, plus Workers Logs for
|
||||
the Worker's own one-line JSON events (outcome and duration — never an IP
|
||||
or a token; invocation logs off).
|
||||
- 403/429 can now come from us, but only as JSON answers from
|
||||
`/api/verify` that the gate consumes and fails open on — never as a page.
|
||||
Page-level 403/429 still cannot happen: the zone's security features
|
||||
(rate limiting, Bot Fight Mode) are deliberately OFF (docs/16 §9), so the
|
||||
templates stay dormant (docs/08 Part C).
|
||||
|
||||
## 2. Project tree
|
||||
|
||||
```
|
||||
softharbor/
|
||||
├── CLAUDE.md # AI dev instructions
|
||||
├── CLAUDE.md # AI dev instructions (hard rules)
|
||||
├── LICENSE # GPL-3.0-only (GitHub picker)
|
||||
├── LICENSE-DATA.md # CC BY-SA 4.0 for src/data/** (docs/14 §1)
|
||||
├── SECURITY.md # reporting policy (docs/09 §5)
|
||||
├── CONTRIBUTING.md / CODE_OF_CONDUCT.md
|
||||
├── CHANGELOG.md # Keep-a-Changelog, features only (docs/13 §1)
|
||||
├── README.md # bilingual EN/VI (written in P6)
|
||||
├── astro.config.ts
|
||||
├── wrangler.jsonc
|
||||
├── README.md # overview, commands, contacts
|
||||
├── astro.config.ts # §4
|
||||
├── wrangler.jsonc # §7
|
||||
├── vitest.config.ts / playwright.config.ts # docs/11
|
||||
├── package.json / pnpm-lock.yaml / .nvmrc / .npmrc
|
||||
├── pnpm-workspace.yaml # allowBuilds gate (docs/09 §7)
|
||||
├── pnpm-workspace.yaml # allowBuilds + overrides (docs/09 §7)
|
||||
├── eslint.config.js / prettier.config.mjs / .prettierignore
|
||||
├── knip.json / lefthook.yml
|
||||
├── renovate.json # dependency policy (docs/12 §6)
|
||||
├── .gitignore
|
||||
├── knip.json / lefthook.yml # docs/10 §4
|
||||
├── .dev.vars.example # Turnstile TEST secret for `wrangler dev`
|
||||
├── sonar-project.properties # SonarQube Cloud CI analysis (docs/12 §2)
|
||||
├── .gitattributes / .gitignore
|
||||
├── .github/
|
||||
│ ├── CODEOWNERS # * @poli0981 + .github/ scripts/ src/data/ (T6)
|
||||
│ ├── CODEOWNERS # * @poli0981 + .github/ scripts/ src/data/ worker/ (T6)
|
||||
│ ├── dependabot.yml # npm + github-actions, weekly (docs/12 §6)
|
||||
│ ├── ISSUE_TEMPLATE/ # bug_report.yml · app_request.yml · config.yml
|
||||
│ └── workflows/ # docs/12: ci.yml · codeql.yml · notify.yml
|
||||
│ # quarantine.yml · link-check.yml
|
||||
│ # (NO deploy/preview — Cloudflare Workers
|
||||
│ # Builds owns deployment, docs/12 §3)
|
||||
├── data/
|
||||
│ └── quarantine/ # flagged apps parked here (docs/03 §5)
|
||||
│ └── quarantine/ # flagged apps parked here (docs/03 §5);
|
||||
│ # created by `pnpm quarantine` on first use
|
||||
├── worker/ # the ONE Worker (D25, docs/08 Part E)
|
||||
│ ├── index.ts # /api/verify → verify.ts, else ASSETS.fetch()
|
||||
│ ├── verify.ts # POST /api/verify → Turnstile Siteverify
|
||||
│ ├── http.ts # JSON responses, body cap, rate-limit key
|
||||
│ ├── env.ts # bindings, typed by hand
|
||||
│ └── *.test.ts # Vitest `worker` project (docs/11)
|
||||
├── e2e/ # Playwright + axe on the build (docs/11 §5)
|
||||
├── scripts/
|
||||
│ ├── validate-data.mjs # cross-file checks beyond Zod (docs/03 §2)
|
||||
│ ├── validate-data.mjs # L2 cross-file data rules (docs/03 §2)
|
||||
│ ├── check-i18n-parity.mjs # EN/VI key parity (docs/07 §3)
|
||||
│ ├── quarantine.mjs # move flagged entries (docs/12 §4)
|
||||
│ ├── quarantine.mjs # `pnpm quarantine` — move flagged entries
|
||||
│ ├── extract-urls.mjs # URL list for lychee (docs/12 §5)
|
||||
│ └── gen-licenses.mjs # third-party notices appendix (docs/14 §3e)
|
||||
│ ├── postbuild.mjs # CSP meta first in <head> (docs/09 §4)
|
||||
│ ├── check-csp.mjs # dist/ markup vs its own page's CSP
|
||||
│ ├── check-assets.mjs # referenced assets exist; no data: scripts
|
||||
│ ├── check-service-worker.mjs # emitted sw.js matches docs/08 Part D
|
||||
│ ├── check-feed.mjs # emitted rss.xml guids/links/order (§A4)
|
||||
│ ├── gen-icons.mjs # `pnpm icons` — favicon + PWA PNGs
|
||||
│ └── fixture.ts / *.test.ts # each script run for real (docs/11 §2)
|
||||
├── public/
|
||||
│ ├── _headers # security + cache headers (docs/09 §4)
|
||||
│ ├── _redirects # path-level slug renames only (docs/16 §4)
|
||||
│ ├── theme.js # no-flash theme script (docs/05 §A8)
|
||||
│ ├── robots.txt
|
||||
│ ├── .well-known/security.txt
|
||||
│ ├── favicon.svg / icons/ # PWA icons
|
||||
│ └── logos/ # (empty; local logos live in src/assets)
|
||||
│ ├── favicon.svg / favicon.ico / apple-touch-icon.png
|
||||
│ └── icons/ # PWA PNGs: 192, 512, maskable-512
|
||||
│ # (no _redirects yet — docs/16 §4)
|
||||
└── src/
|
||||
├── content.config.ts # Zod collections: apps, categories
|
||||
├── data/
|
||||
│ ├── apps/*.json # ONE file per app, filename = slug
|
||||
│ └── categories.json # category registry (docs/04 §4)
|
||||
├── assets/logos/*.svg|webp # self-hosted logos when Simple Icons lacks one
|
||||
├── assets/logos/ # vendor SVGs for `local:` logos (none yet)
|
||||
├── i18n/
|
||||
│ ├── en.json / vi.json # UI dictionaries
|
||||
│ └── index.ts # typed t() helper (docs/07 §3)
|
||||
│ └── index.ts # typed t() + appCount() (docs/07 §3)
|
||||
├── scripts/ # head scripts: plain classic JS, emitted as
|
||||
│ ├── errors.js # hashed /_astro/ files (§4) — ring buffer
|
||||
│ ├── theme.js # (docs/05 §A5), pre-paint display prefs
|
||||
│ └── analytics.js # (§A8), Web Analytics loader (D26)
|
||||
├── lib/
|
||||
│ ├── normalize.ts # VN-insensitive normalizer (docs/05 §A1)
|
||||
│ ├── search.ts # MiniSearch factory (docs/05 §A2)
|
||||
│ ├── stores.ts # nanostores: query/filters/sort
|
||||
│ ├── paths.ts # shared getStaticPaths for both locales (docs/07 §2)
|
||||
│ ├── ringbuffer.ts # console error buffer (docs/05 §A5)
|
||||
│ ├── searchOptions.ts # MiniSearch options, shared (docs/05 §A2)
|
||||
│ ├── search.ts # build-time index factory
|
||||
│ ├── searchIndex.ts # client loader: fetch + import('minisearch')
|
||||
│ ├── stores.ts # nanostores: query/facets/sort (§A3)
|
||||
│ ├── filter.ts / grid.ts # pure filter+sort / grid controller (§A3)
|
||||
│ ├── urlstate.ts # ?q&cat&platform&pricing&sort (§A3)
|
||||
│ ├── legal.ts / human.ts # sh:legal, sh:human (docs/05 §A7, §A9)
|
||||
│ ├── turnstile.ts # gate step 2, browser half (docs/09 §4a)
|
||||
│ ├── theme.ts / prefs.ts / lang.ts # typed storage helpers
|
||||
│ ├── contacts.ts # one address per purpose (D27)
|
||||
│ ├── inlineCss.ts # the one inline <style> (§6)
|
||||
│ ├── locale.ts / paths.ts # locale routing, shared getStaticPaths
|
||||
│ ├── feed.ts # RSS items + /api/apps.json export
|
||||
│ ├── icon.ts / logo.ts # build-time SVG inlining (docs/04 §2)
|
||||
│ ├── licenses.ts # third-party table at build (docs/14 §3e)
|
||||
│ ├── ringbuffer.ts # reader for errors.js (docs/05 §A5)
|
||||
│ └── issueUrl.ts # bug-report URL builder (docs/05 §A6)
|
||||
├── components/
|
||||
│ ├── Sh*.astro # static components (cards, badges, header…)
|
||||
│ ├── Sh*.astro # static: ShAppCard, ShHeader, ShFooter,
|
||||
│ │ # ShIcon (Lucide, build-time), ShJsonLd
|
||||
│ ├── legal/*.astro # the six documents, EN + VI (docs/14)
|
||||
│ ├── pages/*.astro # shared page bodies, one per route shape;
|
||||
│ │ # src/pages/** are thin locale wrappers
|
||||
│ │ # so EN and VI cannot drift (docs/07 §2)
|
||||
│ └── islands/Sh*.svelte # the 6 islands (§5)
|
||||
├── layouts/Base.astro
|
||||
├── styles/global.css # @theme tokens (docs/06 §2)
|
||||
├── layouts/Base.astro # head scripts, gate, header, footer
|
||||
├── styles/
|
||||
│ ├── global.css # @theme tokens (docs/06 §2)
|
||||
│ └── contrast.test.ts # WCAG AA for every token pair
|
||||
└── pages/
|
||||
├── index.astro # Welcome
|
||||
├── apps/index.astro # grid + search island
|
||||
├── apps/[slug].astro # detail (getStaticPaths)
|
||||
├── categories/index.astro # category index
|
||||
├── categories/[id].astro
|
||||
├── legal/{disclaimer,privacy,terms,trademarks,third-party}.astro
|
||||
├── legal/{disclaimer,privacy,terms,trademarks,third-party,
|
||||
│ ai-disclosure}.astro
|
||||
├── contact.astro # one address per purpose (D27)
|
||||
├── errors/{403,429,500}.astro # dormant templates
|
||||
├── 404.astro # → dist/404.html
|
||||
├── offline.astro # SW fallback
|
||||
@@ -111,28 +169,38 @@ softharbor/
|
||||
|
||||
| Route (EN) | VI mirror | Rendered from | Notes |
|
||||
|---|---|---|---|
|
||||
| `/` | `/vi/` | `index.astro` | Welcome: hero, category tiles, latest additions |
|
||||
| `/apps` | `/vi/apps` | `apps/index.astro` | Grid; search/filter island |
|
||||
| `/` | `/vi` | `index.astro` | Welcome: hero, manifest ledger, category grid, principles |
|
||||
| `/apps` | `/vi/apps` | `apps/index.astro` | Grid; search/filter islands; view state in the query string (docs/05 §A3) |
|
||||
| `/apps/[slug]` | `/vi/apps/[slug]` | `[slug].astro` | One page per app; `getStaticPaths` over the collection |
|
||||
| `/categories` | `/vi/categories` | `categories/index.astro` | One tile per category |
|
||||
| `/categories/[id]` | `/vi/categories/[id]` | `[id].astro` | SEO landing per category |
|
||||
| `/legal/*` | `/vi/legal/*` | static pages | Exempt from legal gate (docs/14 §2) |
|
||||
| `/404` | — | `404.astro` | Served via `not_found_handling` |
|
||||
| `/offline` | — | `offline.astro` | SW navigation fallback |
|
||||
| `/errors/{403,429,500}` | — | templates | Dormant until custom domain |
|
||||
| `/legal/*` | `/vi/legal/*` | `LegalPage` + `components/legal/*` | Six documents; gate-exempt (docs/14 Part 2) |
|
||||
| `/contact` | `/vi/contact` | `contact.astro` | One address per purpose (D27); gate-exempt |
|
||||
| `/404` | — | `404.astro` | Served via `not_found_handling`; one bilingual page; gate-exempt |
|
||||
| `/offline` | — | `offline.astro` | SW navigation fallback; one bilingual page; gate-exempt |
|
||||
| `/errors/{403,429,500}` | — | templates | Dormant — Free zone, nothing issues them (docs/08 Part C) |
|
||||
| `/api/apps.json` | — | endpoint | Full dataset export (docs/03 §6) |
|
||||
| `/search-index.json` | — | endpoint | Serialized MiniSearch index, lazy-loaded |
|
||||
| `/rss.xml` | — | endpoint | Latest additions feed |
|
||||
| `POST /api/verify` | — | `worker/` | The only route that runs code (D25, docs/09 §4a) |
|
||||
|
||||
Every page route is prebuilt: 701 HTML files in `dist/` as of 2026-10-21
|
||||
(326 apps × 2 locales plus the rest). Pages without a VI mirror (404,
|
||||
offline, error templates) are single bilingual documents and emit no
|
||||
hreflang alternates (docs/07 §6).
|
||||
|
||||
## 4. Astro configuration (reference)
|
||||
|
||||
```ts
|
||||
// astro.config.ts
|
||||
// astro.config.ts (excerpt — the file itself carries the full reasoning)
|
||||
import { createHash } from 'node:crypto';
|
||||
import { defineConfig } from 'astro/config';
|
||||
import svelte from '@astrojs/svelte';
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
import AstroPWA from '@vite-pwa/astro';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import { VIEW_TRANSITION_OPT_IN } from './src/lib/inlineCss';
|
||||
|
||||
// Reachable but meaningless in SERPs — noindex'd (docs/16 §7) AND kept out of
|
||||
// the sitemap, or GSC reports "Submitted URL marked noindex" forever.
|
||||
@@ -141,26 +209,19 @@ const NON_INDEXED = /\/(404|500|403|429|offline)\/?$/;
|
||||
export default defineConfig({
|
||||
site: 'https://softharbor.net',
|
||||
output: 'static',
|
||||
trailingSlash: 'never', // must agree with wrangler html_handling — §7, spike S1
|
||||
// ONE decision with wrangler's html_handling (§7) — spike S1, measured.
|
||||
trailingSlash: 'never',
|
||||
build: { format: 'file', inlineStylesheets: 'never' },
|
||||
prefetch: false, // Cloudflare 503s speculative Worker requests
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'vi'],
|
||||
routing: { prefixDefaultLocale: false },
|
||||
},
|
||||
integrations: [
|
||||
svelte(),
|
||||
sitemap({
|
||||
i18n: { defaultLocale: 'en', locales: { en: 'en', vi: 'vi' } },
|
||||
filter: (page) => !NON_INDEXED.test(page),
|
||||
}),
|
||||
AstroPWA(/* docs/08 §D */),
|
||||
],
|
||||
// Astro emits a per-page <meta http-equiv="content-security-policy"> whose
|
||||
// script-src/style-src carry hashes for the inline snippets IT generates
|
||||
// (island hydration bootstraps — unavoidable, see docs/09 §4 / D20).
|
||||
// _headers therefore carries ONLY frame-ancestors: both policies are
|
||||
// enforced, so declaring script-src there too would intersect and break
|
||||
// every island.
|
||||
// Per-page <meta http-equiv="content-security-policy"> with hashes for
|
||||
// the inline snippets Astro generates (D20, docs/09 §4). _headers carries
|
||||
// ONLY frame-ancestors: both policies are enforced, so script-src there
|
||||
// too would intersect and break every island.
|
||||
security: {
|
||||
csp: {
|
||||
algorithm: 'SHA-256',
|
||||
@@ -168,42 +229,113 @@ export default defineConfig({
|
||||
"default-src 'self'",
|
||||
"img-src 'self' data:",
|
||||
"font-src 'self'",
|
||||
"connect-src 'self'",
|
||||
"connect-src 'self' https://cloudflareinsights.com", // D26 beacon
|
||||
'frame-src https://challenges.cloudflare.com', // D25 widget
|
||||
"manifest-src 'self'",
|
||||
"base-uri 'none'",
|
||||
"form-action 'none'",
|
||||
"object-src 'none'",
|
||||
],
|
||||
// `resources` REPLACES Astro's default, so 'self' must be listed or
|
||||
// every same-origin script — islands included — is refused.
|
||||
scriptDirective: {
|
||||
resources: [
|
||||
"'self'",
|
||||
'https://static.cloudflareinsights.com', // D26
|
||||
'https://challenges.cloudflare.com', // D25
|
||||
],
|
||||
},
|
||||
// The one is:inline <style> (§6). Astro hashes only what it bundles.
|
||||
styleDirective: {
|
||||
hashes: [
|
||||
`sha256-${createHash('sha256').update(VIEW_TRANSITION_OPT_IN).digest('base64')}`,
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
integrations: [
|
||||
svelte(),
|
||||
sitemap({
|
||||
i18n: { defaultLocale: 'en', locales: { en: 'en', vi: 'vi' } },
|
||||
filter: (page) => !NON_INDEXED.test(page),
|
||||
}),
|
||||
AstroPWA(/* docs/08 Part D */),
|
||||
],
|
||||
vite: {
|
||||
plugins: [tailwindcss(), Icons({ compiler: 'astro' })],
|
||||
// ~icons/<set>/<name> compiles to Svelte components (islands); .astro
|
||||
// files use ShIcon / src/lib/icon.ts instead (docs/10 §3).
|
||||
plugins: [tailwindcss(), Icons({ compiler: 'svelte' })],
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
Notes on the non-obvious keys:
|
||||
|
||||
- **`build.format: 'file'`** makes `/apps` the asset itself (`apps.html`);
|
||||
with `html_handling: "drop-trailing-slash"` the canonical no-slash URL is
|
||||
the one that serves 200 (S1). Side effect: `Astro.url.pathname` is the
|
||||
emitted *file* name, so everything user-facing goes through
|
||||
`canonicalPath()` (docs/07 §6).
|
||||
- **`inlineStylesheets: 'never'`** began as a CSP fix under the former
|
||||
`<ClientRouter />` (a soft navigation refused a page-specific inline
|
||||
stylesheet hashed only into the page it came from) and stays as a cache
|
||||
decision: external CSS needs no hash and is cached once across ~700 pages.
|
||||
- **`prefetch: false`** because Cloudflare answers a `Sec-Purpose: prefetch`
|
||||
request on a Worker with a bare 503 (`Cf-Speculation-Refused`); the zone's
|
||||
Speed Brain hits the same refusal (docs/16 §9).
|
||||
- **Head scripts** (`src/scripts/*.js`) are imported in `Base.astro` with
|
||||
`?url&no-inline`: Vite copies them verbatim to content-hashed `/_astro/`
|
||||
files cached immutably. Plain `?url` would inline files under 4 KiB as
|
||||
`data:` URLs, which `script-src 'self'` refuses — `check:assets` guards it.
|
||||
|
||||
`pnpm build` is the composite every environment runs (CI, Workers Builds,
|
||||
laptops): `validate:data → i18n:check → astro build → postbuild:html →
|
||||
check:csp → check:assets → check:sw → check:feed` (docs/12 §2).
|
||||
|
||||
## 5. Islands & hydration budget
|
||||
|
||||
| Island | Directive | Why |
|
||||
|---|---|---|
|
||||
| `ShLegalGate.svelte` | `client:load` + `transition:persist` | Must block interaction immediately; survives View Transitions |
|
||||
| `ShSearch.svelte` | `client:idle` | Grid is readable without it; index fetched on first focus |
|
||||
| `ShLegalGate.svelte` | `client:load`, rendered by `Base.astro` unless the page declares `gateExempt` | Must block interaction immediately; mounts afresh on every page (§6, docs/14 Part 2) |
|
||||
| `ShSearch.svelte` | `client:idle` | Grid is readable without it; mounts the grid controller (`src/lib/grid.ts`), restores the view from the URL; index and MiniSearch load on first focus/keystroke |
|
||||
| `ShFilterSheet.svelte` | `client:idle` | Shares nanostores with search |
|
||||
| `ShLangSwitch.svelte` | `client:idle` | Persists `sh:lang`, rewrites path |
|
||||
| `ShThemeToggle.svelte` | `client:idle` | Persists `sh:theme`; no-flash script is inline+hashed |
|
||||
| `ShBugReport.svelte` | `client:visible` (footer) | Reads ring buffer, opens prefilled issue URL |
|
||||
| `ShLangSwitch.svelte` | `client:idle` | Server-rendered EN⇄VI pair; carries `?query#hash` across; persists `sh:lang` |
|
||||
| `ShPrefs.svelte` | `client:idle` | Display menu — theme, scrollbar, motion — that replaced `ShThemeToggle` in v1.1; also the global `/` shortcut off `/apps`. `theme.js` has already applied all three pre-paint |
|
||||
| `ShBugReport.svelte` | `client:visible` (footer) | Reads the ring buffer `errors.js` fills; opens prefilled issue URL |
|
||||
|
||||
Everything else is `.astro` with zero client JS. Adding a seventh island
|
||||
requires a decision-log entry.
|
||||
Everything else is `.astro` with zero client JS — including the welcome
|
||||
page's search field and the header's search hint, which are plain links to
|
||||
`/apps#search`. Adding a seventh island requires a decision-log entry;
|
||||
`ShPrefs` replaced `ShThemeToggle` one-for-one, so the count is still six.
|
||||
|
||||
## 6. View Transitions
|
||||
|
||||
Astro `<ClientRouter />` enabled site-wide. Card → detail uses
|
||||
`transition:name={slug}` on the logo+title block for a morph effect;
|
||||
`prefers-reduced-motion` disables all transitions (docs/06 §7). The legal
|
||||
gate island persists across navigations so acceptance state never re-flashes
|
||||
(verified by spike S4).
|
||||
**Native cross-document View Transitions since v1.1; `<ClientRouter />` is
|
||||
gone.** Astro does not support ClientRouter together with `security.csp`,
|
||||
and in practice the soft navigation kept the *first* page's meta CSP, wiped
|
||||
`<html data-theme>`, and kept module state alive while islands reset — the
|
||||
theme flicker and stale sort of v1.0. Every navigation is now a full
|
||||
document load with its own CSP and its own island tree.
|
||||
|
||||
- The opt-in is
|
||||
`@media (prefers-reduced-motion:no-preference){@view-transition{navigation:auto}}`
|
||||
— an **inline, hashed `<style>`** in `Base.astro`, from
|
||||
`src/lib/inlineCss.ts`, whose hash `astro.config.ts` supplies (§4). It
|
||||
cannot live in `global.css`: Chromium decides the new page's opt-in when
|
||||
the parser inserts `<body>`, counting only stylesheets already loaded, and
|
||||
the bundled CSS links come after the blocking head scripts.
|
||||
- Browsers without support simply navigate. `theme.js` marks the
|
||||
transition promises handled on `pageswap`/`pagereveal`, so an aborted fade
|
||||
never lands in the bug-report buffer as an unhandled rejection.
|
||||
- No `transition:persist`, no `transition:name`, no `astro:after-swap`
|
||||
handlers anywhere. Islands remount per page; nanostores live for one page;
|
||||
**the URL is the durable view state** (`?q&cat&platform&pricing&sort`,
|
||||
`src/lib/urlstate.ts`, docs/05 §A3).
|
||||
- The legal gate mounts on every non-exempt page and re-reads `sh:legal` /
|
||||
`sh:human`; there is nothing to carry across navigations.
|
||||
- Reduced motion — OS setting or the display menu's `data-motion="reduce"` —
|
||||
removes the fade (docs/06 §7). The card→detail morph stays withdrawn
|
||||
(docs/06 §7).
|
||||
|
||||
## 7. wrangler.jsonc (reference)
|
||||
|
||||
@@ -211,25 +343,48 @@ gate island persists across navigations so acceptance state never re-flashes
|
||||
{
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "softharbor",
|
||||
"compatibility_date": "2026-07-15",
|
||||
// No "main" — pure static assets, requests are unbilled.
|
||||
"main": "./worker/index.ts", // D25 — POST /api/verify only
|
||||
// ≥ 2025-04-01: a NAVIGATION that matches no asset gets dist/404.html from
|
||||
// the asset server without invoking the Worker (docs/08 Part C).
|
||||
"compatibility_date": "2026-10-01",
|
||||
"assets": {
|
||||
"directory": "./dist",
|
||||
"not_found_handling": "404-page", // serves dist/404.html with HTTP 404
|
||||
// MUST be explicit and MUST agree with astro's trailingSlash: 'never'.
|
||||
// Leaving it to the default is how a site ends up serving both
|
||||
// /apps/7-zip and /apps/7-zip/ (duplicate content) or 307-looping between
|
||||
// them. Spike S1 curl-tests both variants and pins the right value here.
|
||||
"html_handling": "auto-trailing-slash"
|
||||
"binding": "ASSETS",
|
||||
"not_found_handling": "404-page", // serves dist/404.html with HTTP 404
|
||||
// MUST agree with astro's trailingSlash 'never' + build.format 'file'.
|
||||
// Measured in S1 on a real deploy: "auto-trailing-slash" 307s /apps to
|
||||
// /apps/, contradicting every canonical; this makes /apps the 200.
|
||||
"html_handling": "drop-trailing-slash",
|
||||
// The only path that runs the Worker before the asset server.
|
||||
"run_worker_first": ["/api/verify"]
|
||||
},
|
||||
"routes": [
|
||||
{ "pattern": "softharbor.net", "custom_domain": true } // docs/16 §3
|
||||
// Workers Rate Limiting for /api/verify: 20 per 60 s per IPv4 address or
|
||||
// IPv6 /64, per Cloudflare location. namespace_id is account-wide.
|
||||
"ratelimits": [
|
||||
{ "name": "VERIFY_LIMITER", "namespace_id": "4101",
|
||||
"simple": { "limit": 20, "period": 60 } }
|
||||
],
|
||||
// Workers Logs keep the Worker's own JSON lines; invocation logs are off.
|
||||
"observability": {
|
||||
"enabled": true,
|
||||
"logs": { "enabled": true, "invocation_logs": false }
|
||||
},
|
||||
// No "routes" (since commit 66c6255, 2026-07-28): softharbor.net and
|
||||
// www.softharbor.net are Custom Domains attached in the dashboard, which a
|
||||
// deploy then leaves untouched (docs/16 §2.2, §3).
|
||||
"workers_dev": false, // canonical origin is the custom domain only
|
||||
"preview_urls": true // explicit: defaults to workers_dev's value
|
||||
"preview_urls": true // PR previews; _headers marks them noindex
|
||||
}
|
||||
```
|
||||
|
||||
Rules: never add `main` without a decision-log entry (it flips billing and
|
||||
the error model); never enable `run_worker_first`; never re-enable
|
||||
`workers_dev` (duplicate-content hazard — docs/16 §1/N3).
|
||||
Rules:
|
||||
|
||||
- `main` exists since D25 and serves **only** `/api/verify`. Adding any
|
||||
path to `run_worker_first` — or letting the Worker serve, gate or rewrite
|
||||
a page — needs a decision-log entry: every match is a billed invocation,
|
||||
and hard rule 1 allows one route.
|
||||
- Never re-enable `workers_dev` (duplicate-content hazard — docs/16 §1/N3).
|
||||
- Do not re-add `routes` without re-reading docs/16 §2.2: a deploy
|
||||
reconciles the Worker's triggers, which is how `www` was lost once.
|
||||
- The Turnstile secret is **not** in this file and never in the repo: it is
|
||||
a runtime secret, `TURNSTILE_SECRET` (docs/08 Part E).
|
||||
+75
-26
@@ -12,7 +12,8 @@
|
||||
▼
|
||||
CI: Zod schema (build) + validate-data.mjs + link check on new URLs
|
||||
▼
|
||||
review → squash-merge → deploy workflow → live
|
||||
review → squash-merge (signed) → Workers Builds deploy → verify production
|
||||
(docs/13 §3) → live
|
||||
```
|
||||
|
||||
Rules: one app per PR; PR title `data: add <slug>`; summaries written from
|
||||
@@ -23,12 +24,31 @@ review date after the maintainer runs the vetting checklist (docs/09 §6).
|
||||
|
||||
| Layer | Where | Catches |
|
||||
|---|---|---|
|
||||
| L1 Zod schema | `src/content.config.ts`, runs inside `astro build` | Types, enums, URL shape, summary lengths, date formats |
|
||||
| L2 `scripts/validate-data.mjs` | CI (`ci.yml` job `gates`) + pre-commit | Cross-file rules Zod can't see: **slug format `^[a-z0-9]+(-[a-z0-9]+)*$` and ≤ 40 chars** (docs/04 §2 — Zod never sees the filename), duplicate slugs vs filenames, duplicate `name` (case/diacritic-insensitive), `categories[]` ids exist in registry, `links.*` are https, no `flagged` entries inside `src/data/apps/`, logo asset exists when `local:` |
|
||||
| L2b `scripts/check-i18n-parity.mjs` | CI (`ci.yml` job `gates`) + pre-commit | EN/VI dictionary key parity (docs/07 §3) — a **separate** script and a separate `pnpm i18n:check`, because it is triggered by `src/i18n/**`, not `src/data/**` |
|
||||
| L3 lychee link check | CI (PR: changed files only; weekly: all) | Dead/redirected official links |
|
||||
| L1 Zod schema | `src/content.config.ts`, runs inside `astro build` | Types, enums, https-only URLs, summary lengths; dates must be **real calendar dates** (`2026-02-31` fails) **not in the future**; `updatedAt ≥ addedAt`; **`evidence` required for `clean` and `flagged`**; unknown keys (`.strict()`) — docs/04 §1 |
|
||||
| L2 `scripts/validate-data.mjs` | first step of `pnpm build`; CI (`ci.yml` job `gates`) + pre-commit | Cross-file and provenance rules Zod can't see, listed below |
|
||||
| L2b `scripts/check-i18n-parity.mjs` | second step of `pnpm build`; CI (`ci.yml` job `gates`) + pre-commit | EN/VI dictionary key parity, placeholder parity, alphabetical order (docs/07 §3) — a **separate** script and a separate `pnpm i18n:check`, because it is triggered by `src/i18n/**`, not `src/data/**` |
|
||||
| L3 lychee link check | CI (PR: changed files only; weekly: all) | Dead official links; 403/429 count as reachable (bot mitigation, docs/12 §5) |
|
||||
| L4 Human review | PR review | Criteria judgment, summary quality, official-domain authenticity |
|
||||
|
||||
**L2 rules** (`file → rule → detail`; each is a fixture test in
|
||||
`scripts/validate-data.test.ts`):
|
||||
|
||||
| Rule | Fails when |
|
||||
|---|---|
|
||||
| `slug-format` / `slug-length` | filename is not `^[a-z0-9]+(-[a-z0-9]+)*$`, or longer than 40 chars (docs/04 §2 — Zod never sees the filename; duplicate slugs cannot exist in one directory) |
|
||||
| `duplicate-name` | two `name`s collide after `normalizeViet` (case- and diacritic-insensitive) |
|
||||
| `unknown-category` | a `categories[]` id is not in `categories.json` |
|
||||
| `bad-url` / `insecure-link` | a `links.*` or `security.evidence` value does not parse, or is not https |
|
||||
| `punycode-host` | any host label starts with `xn--` — check for a look-alike |
|
||||
| `download-portal` | the host is (or is under) a denylisted portal/mirror: softpedia, filehorse, uptodown, download.cnet, majorgeeks, filehippo, softonic, fosshub, techspot, malavida, chip.de, portableapps, apkmirror, getintopc |
|
||||
| `tracking-param` | a query key is `utm_*`, `fbclid`, `gclid`, `dclid`, `msclkid`, `mc_eid`, `ref`, `aff`, `affiliate` or `partner` |
|
||||
| `invisible-char` | any string value contains a zero-width or bidi-control character |
|
||||
| `flagged-in-main-tree` | `security.status` is `flagged` inside `src/data/apps/` — run `pnpm quarantine` (§5) |
|
||||
| `missing-logo` | a `local:` logo is not in `src/assets/logos/` — compared against the directory listing, **case-sensitively** (Windows would accept a wrong case that Linux CI and Workers Builds reject) |
|
||||
| `future-date` / `date-order` | `addedAt`, `updatedAt` or `checkedAt` after today; `updatedAt` before `addedAt` |
|
||||
| `unflagged-in-quarantine` / `slug-in-both-trees` | a file in `data/quarantine/` no longer says `flagged`, or the same slug is live and quarantined |
|
||||
| `stale-check` (**warning**) | `security.checkedAt` older than 180 days — re-verify (docs/13 §6); grouped, never fails the build |
|
||||
|
||||
Both L2 scripts are plain Node (`fs` + `JSON.parse`) — they run **outside**
|
||||
Astro and must never import from `astro:content`. Failures print a table of
|
||||
`file → rule → detail` and exit non-zero. Port the structure from
|
||||
@@ -37,9 +57,13 @@ implement exactly this contract.
|
||||
|
||||
## 3. Build artifacts (derived, never hand-edited)
|
||||
|
||||
`astro build` produces, from the single source of truth:
|
||||
`astro build` produces, from the single source of truth (701 HTML pages as
|
||||
of 2026-10-21; `pnpm build` then checks the output — docs/02 §4):
|
||||
|
||||
1. **Pages** — `/apps/<slug>` ×2 locales, category pages, grid, welcome.
|
||||
1. **Pages** — `/apps/<slug>` ×2 locales, category index + category pages,
|
||||
grid, welcome, contact, the six legal documents (the third-party table
|
||||
generated from `package.json` at build time, docs/14 §3e), 404/offline
|
||||
and the dormant error templates.
|
||||
2. **`/search-index.json`** — serialized MiniSearch index built in
|
||||
`search-index.json.ts`: for each app, `slug` (the id) plus the **raw**
|
||||
`name`, `tags`, `summaryEn`, `summaryVi` (docs/05 §A2). There are no
|
||||
@@ -49,15 +73,19 @@ implement exactly this contract.
|
||||
One function, one import, no duplicated logic (docs/05 §A1). Display data
|
||||
is **not** stored in the index — it is already in the DOM (docs/05 §A3).
|
||||
3. **`/api/apps.json`** — full public dataset export (§6).
|
||||
4. **`/rss.xml`** — 50 newest by `addedAt` (§7).
|
||||
4. **`/rss.xml`** — 50 newest by `addedAt` (§7), its emitted guids, links
|
||||
and order asserted by `check:feed`.
|
||||
5. **Sitemap** with hreflang pairs (docs/07 §6).
|
||||
|
||||
## 4. Update & re-verification flow
|
||||
|
||||
- Editing an app = PR touching its one file; bump `updatedAt`.
|
||||
- Monthly batch (docs/13 §6): oldest `security.checkedAt` entries get
|
||||
re-vetted; refresh `checkedAt` even when nothing changed — the dated
|
||||
status is the product's honesty mechanism.
|
||||
- Re-checks are automated since 2026-10-23 (docs/12 §4b): `vt-recheck.yml`
|
||||
re-scans every entry whose `checkedAt` is older than 90 days, a few
|
||||
hundred requests a day within VirusTotal's Public API limits, into one
|
||||
accumulating PR. It refreshes `checkedAt` even when nothing changed — the
|
||||
dated status is the product's honesty mechanism — and turns any detection
|
||||
into `unverified` plus an issue, never into a flag.
|
||||
|
||||
## 5. Quarantine state machine (hard rules 4–5)
|
||||
|
||||
@@ -71,10 +99,11 @@ implement exactly this contract.
|
||||
┌─────────────────────────────────────┐
|
||||
│ flagged │ (set in PR or by maintainer)
|
||||
└──────────────────┬──────────────────┘
|
||||
▼ quarantine workflow (docs/12 §4)
|
||||
▼ `pnpm quarantine` in the same PR — or, as the
|
||||
▼ safety net, the quarantine workflow (docs/12 §4)
|
||||
file moved src/data/apps/x.json → data/quarantine/x.json
|
||||
+ issue opened: reason, evidence link, date
|
||||
+ site rebuild → app disappears
|
||||
+ merge → deploy → app disappears (verify production, docs/13 §3)
|
||||
│
|
||||
cleared? reviewed restore PR (status back to clean/unverified,
|
||||
new checkedAt, evidence) → file moves back
|
||||
@@ -83,7 +112,14 @@ implement exactly this contract.
|
||||
Invariants: `data/quarantine/` is outside the content glob, so quarantined
|
||||
entries can never render; the *reason* lives in the issue + commit message,
|
||||
keeping the data file schema-identical for painless restore; deletion of a
|
||||
data file is only allowed for entries that never shipped.
|
||||
data file is only allowed for entries that never shipped. `validate:data`
|
||||
enforces both directions — a `flagged` file may not stay in
|
||||
`src/data/apps/`, a quarantined file must still say `flagged`, and one slug
|
||||
may not live in both trees (§2) — so a PR that flags an entry fails until
|
||||
`pnpm quarantine` has moved it. The directory itself appears with the first
|
||||
quarantined entry. A flagged entry vanishes from all five surfaces: detail
|
||||
page, grid, `/api/apps.json`, `/rss.xml` and the search index (tested
|
||||
end-to-end 2026-07-28).
|
||||
|
||||
## 6. `/api/apps.json` contract (for tools & future extensions)
|
||||
|
||||
@@ -103,9 +139,12 @@ data file is only allowed for entries that never shipped.
|
||||
contract — getting it right costs nothing now and a breaking change later.
|
||||
|
||||
Every app object carries every field of docs/04 §1 including `developer`,
|
||||
plus `slug`. Because the collection schema is `.strict()`, the export shape
|
||||
cannot silently grow. Breaking changes require a `schemaVersion` bump and a
|
||||
decision-log entry.
|
||||
plus `slug`, with `categories` as plain ids. Because the collection schema is
|
||||
`.strict()`, the export shape cannot silently grow. Breaking changes require
|
||||
a `schemaVersion` bump and a decision-log entry. `apps` is sorted by slug in
|
||||
code-unit order — a stable document whatever machine builds it (docs/05
|
||||
§A4). Served with `Access-Control-Allow-Origin: *` and a 300 s cache
|
||||
(docs/09 §4).
|
||||
|
||||
`generatedAt` is a build timestamp, so this file changes on every deploy even
|
||||
when the data does not. That is fine here — but it is exactly why `/rss.xml`
|
||||
@@ -119,20 +158,30 @@ byte-determinism is a contract, this file's is not.
|
||||
`notify.py` cross-poster consumes this feed on its GitHub Actions cron and
|
||||
announces new items to Telegram / Discord / Bluesky / Mastodon / X /
|
||||
Facebook — no new announcement code needed in this repo (integration notes:
|
||||
docs/13 §5).
|
||||
docs/13 §5). It announces every guid it has not seen, so `check:feed`
|
||||
asserts the emitted guids, links and order on every build (docs/05 §A4).
|
||||
Tagged releases are announced separately, Discord only, by `notify.yml`
|
||||
(docs/12 §2).
|
||||
|
||||
## 8. Client-side flow
|
||||
|
||||
```
|
||||
first paint: static HTML (grid server-rendered with ALL apps, unfiltered)
|
||||
└─ ShSearch hydrates on idle
|
||||
└─ on first focus/keystroke: fetch /search-index.json (~tens of KB)
|
||||
└─ MiniSearch.loadJSON → results drive nanostores
|
||||
└─ grid cards toggle visibility (no re-render of content)
|
||||
errors anywhere: window.onerror / unhandledrejection → ring buffer (A5)
|
||||
first paint: static HTML (grid server-rendered with ALL apps, A–Z)
|
||||
├─ <head>: errors.js (ring buffer, first) → theme.js (pre-paint prefs)
|
||||
│ → registerSW.js, analytics.js (defer)
|
||||
└─ ShSearch hydrates on idle → restores ?q&cat&platform&pricing&sort
|
||||
└─ on first focus/keystroke: fetch /search-index.json
|
||||
+ import('minisearch') — one shared promise per page
|
||||
└─ MiniSearch.loadJSON → ranked hits → grid controller
|
||||
└─ cards toggle `hidden` and move in the DOM (no
|
||||
re-render of content); the URL follows (replaceState)
|
||||
errors anywhere: own-origin errors, unhandled rejections, CSP violations,
|
||||
hydration errors → ring buffer (A5)
|
||||
└─ ShBugReport builds prefilled GitHub issue URL (A6)
|
||||
```
|
||||
|
||||
Graceful degradation: with JS disabled, the full grid, category pages, and
|
||||
all links still work; only search/filter/theme/lang-switch degrade (links in
|
||||
the header still navigate to `/vi/…`).
|
||||
all links still work; search, filters, the display menu and the legal gate
|
||||
(all islands) do not run. Dark mode still follows the OS — the CSS's
|
||||
`prefers-color-scheme` block needs no script (docs/06 §2) — and the header's
|
||||
search hint and EN/VI links are plain links.
|
||||
+88
-36
@@ -10,10 +10,20 @@ derived. Schema version: **1** (bump requires migration note in docs/15).
|
||||
import { defineCollection, reference, z } from 'astro:content';
|
||||
import { glob, file } from 'astro/loaders';
|
||||
|
||||
const DATE = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'YYYY-MM-DD');
|
||||
const HTTPS = z.string().url().startsWith('https://');
|
||||
/** Today in UTC, at build time: data dated after the build is a typo. */
|
||||
const TODAY = new Date().toISOString().slice(0, 10);
|
||||
|
||||
export const categories = defineCollection({
|
||||
// A REAL calendar date, not in the future — the regex alone let
|
||||
// `2026-02-31` through; round-tripping through Date catches it.
|
||||
const DATE = z
|
||||
.string()
|
||||
.regex(/^\d{4}-\d{2}-\d{2}$/, 'YYYY-MM-DD')
|
||||
.refine((d) => new Date(`${d}T00:00:00Z`).toISOString().slice(0, 10) === d,
|
||||
{ message: 'not a real calendar date' })
|
||||
.refine((d) => d <= TODAY, { message: 'date is in the future' });
|
||||
const HTTPS = z.url().refine((u) => u.startsWith('https://'), { message: 'https:// only' });
|
||||
|
||||
const categories = defineCollection({
|
||||
loader: file('./src/data/categories.json'),
|
||||
schema: z.object({
|
||||
id: z.string().regex(/^[a-z0-9-]+$/),
|
||||
@@ -23,7 +33,7 @@ export const categories = defineCollection({
|
||||
}),
|
||||
});
|
||||
|
||||
export const apps = defineCollection({
|
||||
const apps = defineCollection({
|
||||
loader: glob({ pattern: '*.json', base: './src/data/apps' }), // id = filename = slug
|
||||
schema: z.object({
|
||||
name: z.string().min(1).max(60),
|
||||
@@ -50,14 +60,30 @@ export const apps = defineCollection({
|
||||
}),
|
||||
addedAt: DATE,
|
||||
updatedAt: DATE.optional(),
|
||||
}).strict(),
|
||||
})
|
||||
.strict()
|
||||
.superRefine((app, ctx) => {
|
||||
// A status that makes a claim must link the evidence behind it.
|
||||
if (app.security.status !== 'unverified' && app.security.evidence === null)
|
||||
ctx.addIssue({ code: 'custom', path: ['security', 'evidence'],
|
||||
message: `status "${app.security.status}" requires an evidence URL` });
|
||||
if (app.updatedAt && app.updatedAt < app.addedAt)
|
||||
ctx.addIssue({ code: 'custom', path: ['updatedAt'],
|
||||
message: `updatedAt ${app.updatedAt} precedes addedAt ${app.addedAt}` });
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { apps, categories };
|
||||
```
|
||||
|
||||
`.strict()` is deliberate: unknown keys fail the build, so the export
|
||||
contract (docs/03 §6) never silently grows.
|
||||
contract (docs/03 §6) never silently grows. The two refinements are v1.1:
|
||||
"no known warnings" is only worth something when the reader can check it
|
||||
(hard rule 4) and a flag needs its reason — CONTRIBUTING closed `clean`
|
||||
without evidence on sight, but nothing enforced it; `unverified` claims
|
||||
nothing, so its `evidence` stays optional. Cross-file rules (slug format,
|
||||
duplicates, link provenance, invisible characters, quarantine) are L2,
|
||||
`scripts/validate-data.mjs` (docs/03 §2).
|
||||
|
||||
## 2. Field reference
|
||||
|
||||
@@ -73,26 +99,26 @@ contract (docs/03 §6) never silently grows.
|
||||
| `platforms` | enum[] | Desktop only. An app available elsewhere still lists only its desktop targets. |
|
||||
| `pricing` | enum | See §5 — this encodes inclusion criterion C2/C3. |
|
||||
| `license` | SPDX \| null | `null` = closed source (renders no badge). Use exact SPDX ids: `GPL-3.0-only`, `MIT`, `LGPL-2.1-or-later`… "Open Source" UI badge = `license !== null`. |
|
||||
| `links.homepage` | https URL | Developer's official domain. |
|
||||
| `links.homepage` | https URL | Developer's official domain. L2 refuses download portals, IDN (`xn--`) hosts and tracking parameters (docs/03 §2). |
|
||||
| `links.repo` | https URL \| null | Official GitHub/GitLab/Codeberg… only. |
|
||||
| `links.download` | https URL | Official download page (page, not direct binary, when both exist). |
|
||||
| `security.status` | enum | `unverified` (default at entry) · `clean` (vetting checklist passed, docs/09 §6) · `flagged` (blocks listing → quarantine, docs/03 §5). |
|
||||
| `security.evidence` | URL \| null | VirusTotal scan of the download page/file, or vendor advisory. Required when `flagged`; recommended when `clean`. |
|
||||
| `security.checkedAt` | date | Date the status was last verified — rendered on the card ("checked 2026-07-15"). |
|
||||
| `addedAt` / `updatedAt` | date | Drive RSS + "Latest additions" + sort. |
|
||||
| `security.evidence` | https URL \| null | VirusTotal scan of the download page/file, or vendor advisory. **Required by the schema when `clean` or `flagged`** (since v1.1); optional for `unverified`, though held entries carry theirs too. Linked from the detail page ("View scan", docs/06 §5). |
|
||||
| `security.checkedAt` | date | Date of the latest scan behind the status — rendered on the card ("checked 30 Jul 2026"). The full docs/09 §6 checklist runs when an entry is first marked `clean` and whenever its links change; `vt-recheck.yml` re-scans at least every 90 days and moves this date (never `addedAt`/`updatedAt`). A real date, not in the future; `validate:data` warns once it is older than 180 days. |
|
||||
| `addedAt` / `updatedAt` | date | Drive RSS, the "Newest" sort and category-page order. Real dates, not in the future; `updatedAt` ≥ `addedAt`. |
|
||||
|
||||
## 3. Pricing semantics (rulings)
|
||||
|
||||
| Value | Meaning | Examples |
|
||||
|---|---|---|
|
||||
| `free` | Fully usable forever at $0. Includes freemium products **whose free tier alone is self-sufficient** even if the paid upgrade is a subscription (criterion C3). | VLC, 7-Zip, Bitwarden (free tier) |
|
||||
| `free-onetime` | Free tier + optional **single lifetime payment** unlock. | — (tag on entry) |
|
||||
| `onetime` | Paid once, perpetual license, optional paid major upgrades allowed. | Affinity Photo, Sublime Text |
|
||||
| `free` | Fully usable forever at $0. Includes freemium products **whose free tier alone is self-sufficient** even if the paid upgrade is a subscription (criterion C3). | VLC, 7-Zip, Bitwarden (free tier) — 330 entries |
|
||||
| `free-onetime` | Free tier + optional **single lifetime payment** unlock. | FreeFileSync, eM Client, HWiNFO, Shottr, AltTab — 16 entries |
|
||||
| `onetime` | Paid once, perpetual license, optional paid major upgrades allowed. | Sublime Text, REAPER, Total Commander, Fork — 18 entries |
|
||||
| *(excluded)* | Subscription required for core desktop use; time-limited trials; crippled demos. | Adobe CC, MS 365 |
|
||||
|
||||
Ambiguous cases → decision log (docs/15 §4) before merge.
|
||||
|
||||
## 4. Category registry (initial 12)
|
||||
## 4. Category registry (12 at launch, 14 since 2026-10-23)
|
||||
|
||||
`src/data/categories.json` — id · EN · VI · lucide icon:
|
||||
|
||||
@@ -110,13 +136,18 @@ Ambiguous cases → decision log (docs/15 §4) before merge.
|
||||
| `file-management` | File Management | Quản lý tệp | `folder` |
|
||||
| `gaming` | Gaming Tools | Công cụ chơi game | `gamepad-2` |
|
||||
| `system` | System Tools | Công cụ hệ thống | `cpu` |
|
||||
| `ai-local` | Local AI | AI cục bộ | `brain-circuit` |
|
||||
| `cad-3d` | CAD & 3D | CAD & 3D | `drafting-compass` |
|
||||
|
||||
Adding a category = PR editing this file + decision-log line (keeps the
|
||||
taxonomy from sprawling).
|
||||
taxonomy from sprawling). `ai-local` and `cad-3d` came with catalogue
|
||||
batch 2 (D31): models that run on your own machine, and CAD/EDA/3D-printing
|
||||
tools. The categories page counts them itself (`categories.intro` and
|
||||
`meta.categories` take `{n}`), so a new row needs no copy change.
|
||||
|
||||
## 5. Example files
|
||||
|
||||
`src/data/apps/7-zip.json` — free, open source:
|
||||
`src/data/apps/7-zip.json` — free, open source (the shipped file):
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -137,34 +168,44 @@ taxonomy from sprawling).
|
||||
"repo": null,
|
||||
"download": "https://www.7-zip.org/download.html"
|
||||
},
|
||||
"security": { "status": "clean", "evidence": null, "checkedAt": "2026-07-15" },
|
||||
"addedAt": "2026-07-15"
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/273d0beedb411e020dd6ce34a46330b626a4ed56df427f806c4c552ea5c287e7",
|
||||
"checkedAt": "2026-07-30"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
```
|
||||
|
||||
`src/data/apps/affinity-photo.json` — one-time purchase, closed source:
|
||||
`src/data/apps/sublime-text.json` — one-time purchase, closed source (the
|
||||
shipped file). It replaces the earlier Affinity Photo example: the catalogue
|
||||
lists today's Affinity (Canva) as `free`.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Affinity Photo",
|
||||
"developer": "Serif (Europe) Ltd",
|
||||
"logo": "simple-icons:affinityphoto",
|
||||
"name": "Sublime Text",
|
||||
"developer": "Sublime HQ Pty Ltd",
|
||||
"logo": "simple-icons:sublimetext",
|
||||
"summary": {
|
||||
"en": "Professional photo editor sold as a one-time purchase — a perpetual-license alternative to subscription editors.",
|
||||
"vi": "Trình chỉnh sửa ảnh chuyên nghiệp bán theo hình thức mua đứt một lần — thay thế cho các trình chỉnh sửa thuê bao."
|
||||
"en": "Native code editor known for fast startup, multiple cursors and project-wide Goto Anything search.",
|
||||
"vi": "Trình soạn thảo mã gốc, khởi động nhanh, hỗ trợ nhiều con trỏ và tìm kiếm Goto Anything toàn dự án."
|
||||
},
|
||||
"categories": ["graphics"],
|
||||
"tags": ["photo-editing", "raw"],
|
||||
"platforms": ["windows", "macos"],
|
||||
"categories": ["ide-editor", "developer-tools"],
|
||||
"tags": ["native", "multiple-cursors", "plugins", "cross-platform"],
|
||||
"platforms": ["windows", "macos", "linux"],
|
||||
"pricing": "onetime",
|
||||
"license": null,
|
||||
"links": {
|
||||
"homepage": "https://affinity.serif.com",
|
||||
"homepage": "https://www.sublimetext.com",
|
||||
"repo": null,
|
||||
"download": "https://affinity.serif.com/photo/"
|
||||
"download": "https://www.sublimetext.com/download"
|
||||
},
|
||||
"security": { "status": "unverified", "evidence": null, "checkedAt": "2026-07-15" },
|
||||
"addedAt": "2026-07-15"
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/50dc606906fd62b2283cc55dde1d5f1d85407d0a38a1883ef35c81ede28f0c49",
|
||||
"checkedAt": "2026-07-30"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -184,7 +225,7 @@ and the renderer draws the initials (D23). VSCodium itself now resolves to
|
||||
"vi": "Bản dựng cộng đồng từ mã nguồn VS Code, đã loại bỏ telemetry và thương hiệu của Microsoft."
|
||||
},
|
||||
"categories": ["ide-editor", "developer-tools"],
|
||||
"tags": ["editor", "open-source-build"],
|
||||
"tags": ["editor", "open-source-build", "no-telemetry"],
|
||||
"platforms": ["windows", "macos", "linux"],
|
||||
"pricing": "free",
|
||||
"license": "MIT",
|
||||
@@ -193,13 +234,24 @@ and the renderer draws the initials (D23). VSCodium itself now resolves to
|
||||
"repo": "https://github.com/VSCodium/vscodium",
|
||||
"download": "https://github.com/VSCodium/vscodium/releases"
|
||||
},
|
||||
"security": { "status": "clean", "evidence": null, "checkedAt": "2026-07-15" },
|
||||
"addedAt": "2026-07-15"
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/0f460f5b6220092a8f378b0ad71922d549d99331e352143c1ef9e2ed4f83f0a5",
|
||||
"checkedAt": "2026-07-30"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
```
|
||||
|
||||
As of v1.2 no entry uses `local:` (`src/assets/logos/` does not exist yet):
|
||||
127 entries use `simple-icons:`, 237 `monogram` (364 in all).
|
||||
|
||||
## 6. Quarantine files
|
||||
|
||||
Schema-identical (§1) — the file simply lives in `data/quarantine/` and
|
||||
keeps `status: "flagged"`. Reason/evidence/date live in the linked issue and
|
||||
commit message (docs/03 §5), so restoring is a plain `git mv` + status edit.
|
||||
keeps `status: "flagged"` (which, since v1.1, also means it carries an
|
||||
`evidence` URL). Reason/evidence/date live in the linked issue and commit
|
||||
message (docs/03 §5). `pnpm quarantine` moves a flagged file there;
|
||||
restoring is a reviewed PR that moves it back (`git mv`) and edits the
|
||||
status — `validate:data` refuses a quarantined file that no longer says
|
||||
`flagged`, and a slug that is live and quarantined at once.
|
||||
+308
-83
@@ -38,34 +38,40 @@ decomposed sequences. `normalize('NFD')` unifies both before stripping.
|
||||
|
||||
Applied at **build time** to index fields and at **query time** via
|
||||
MiniSearch's `processTerm` — the same function on both sides, imported from
|
||||
one module (never duplicated).
|
||||
one module (never duplicated). The same fold keys the name sort
|
||||
(`compareNames`, §A3). The one deliberate copy lives in
|
||||
`scripts/validate-data.mjs`, which runs in plain Node and cannot import from
|
||||
`src/`; it is used only to catch duplicate names (docs/03 §2).
|
||||
|
||||
## A2 — Search index & query (MiniSearch)
|
||||
|
||||
```ts
|
||||
// src/lib/search.ts
|
||||
import MiniSearch from 'minisearch';
|
||||
// src/lib/searchOptions.ts — shared verbatim by the build-time indexer
|
||||
// (search.ts → search-index.json.ts) and the client loader (searchIndex.ts).
|
||||
// Deliberately free of any `minisearch` import (see below).
|
||||
import { normalizeViet } from './normalize';
|
||||
|
||||
export const FUZZY = 0.25; // D22 — measured, see below
|
||||
|
||||
export const miniSearchOptions = {
|
||||
idField: 'slug',
|
||||
fields: ['name', 'tags', 'summaryEn', 'summaryVi'], // raw values, not pre-normalized
|
||||
// No storeFields: MiniSearch already returns the id on every result, and
|
||||
// display data is in the DOM (A3). Storing anything here just inflates
|
||||
// /search-index.json.
|
||||
extractField: (doc, field) => {
|
||||
extractField: (doc: Record<string, unknown>, field: string): string => {
|
||||
const v = doc[field];
|
||||
return Array.isArray(v) ? v.join(' ') : v; // `tags` is string[] — be explicit
|
||||
return Array.isArray(v) ? v.join(' ') : ((v as string | undefined) ?? '');
|
||||
},
|
||||
processTerm: (t: string) => {
|
||||
processTerm: (t: string): string | null => {
|
||||
const n = normalizeViet(t);
|
||||
return n.length > 0 ? n : null; // null drops the term
|
||||
},
|
||||
searchOptions: {
|
||||
prefix: true,
|
||||
fuzzy: 0.15, // PROVISIONAL — S2 sets the real value, see below
|
||||
fuzzy: FUZZY,
|
||||
boost: { name: 3, tags: 2, summaryEn: 1, summaryVi: 1 },
|
||||
combineWith: 'AND',
|
||||
combineWith: 'AND' as const,
|
||||
},
|
||||
} as const;
|
||||
```
|
||||
@@ -77,11 +83,29 @@ export const miniSearchOptions = {
|
||||
add pre-normalized `nameNorm`/`summaryEnNorm` copies: they would double the
|
||||
index and give `boost` two sets of keys to disagree about.
|
||||
- Index is built in `src/pages/search-index.json.ts` at build time
|
||||
(`MiniSearch.addAll` over the collection → `JSON.stringify(mini)`), then
|
||||
`MiniSearch.loadJSON` on the client — zero client-side indexing cost.
|
||||
- Lazy-load on first focus/keystroke of the search input; show a subtle
|
||||
"loading index…" state for the (rare) slow fetch.
|
||||
- Empty query ⇒ search layer passes *all* slugs through to A3.
|
||||
(`buildIndex()` in `src/lib/search.ts`: `addAll` over the collection →
|
||||
`JSON.stringify`), then `MiniSearch.loadJSON` on the client — zero
|
||||
client-side indexing cost.
|
||||
- **Client loader** (`src/lib/searchIndex.ts`): on the first focus or
|
||||
keystroke it fetches `/search-index.json` **and** pulls MiniSearch in with
|
||||
a dynamic `import('minisearch')` — the library used to ship in `/apps`'
|
||||
static bundle. One promise per page, shared by every caller, so a burst of
|
||||
keystrokes costs one download. A non-OK response or a failed import
|
||||
rejects, clears the cached promise (the next keystroke retries) and puts
|
||||
the island in an error state: "Search is unavailable right now — the
|
||||
filters still work" (`search.error`). The facets never depend on the index
|
||||
(A3).
|
||||
- **Query flow** (`ShSearch.svelte`): input is debounced **150 ms**, then
|
||||
the trimmed query goes to `query` and a **sequence number** is taken; a
|
||||
result that arrives after a newer query (or after the box was emptied) is
|
||||
dropped, so a late index can never filter the grid behind an empty box.
|
||||
The hits, in MiniSearch's rank order, go to the grid controller (A3).
|
||||
A subtle "loading" label shows while the fetch is in flight.
|
||||
- **Relevance order.** While a query is active the sort switches from A–Z
|
||||
to "Best match" (`relevance`) — unless the visitor has picked an order
|
||||
themselves; emptying the query switches back.
|
||||
- Empty query ⇒ the search layer constrains nothing (`setSearchHits(null)`),
|
||||
i.e. *all* slugs pass through to A3. Esc clears the box first, then blurs.
|
||||
|
||||
**`fuzzy = 0.25` — settled by measurement in S2 (2026-07-27), decision D22.**
|
||||
MiniSearch converts the fraction to `round(term.length × fuzzy)` edits. The
|
||||
@@ -110,7 +134,12 @@ by turning the constant up.
|
||||
## A3 — Filter & sort composition
|
||||
|
||||
State (nanostores, `src/lib/stores.ts`): `query`, `categories: Set`,
|
||||
`platforms: Set`, `pricing: Set`, `sort: 'name' | 'added'`.
|
||||
`platforms: Set`, `pricing: Set`, `sort: 'name' | 'added' | 'relevance'`,
|
||||
plus `visibleCount` (written by the grid, read by the filter sheet's "Show N
|
||||
apps"). `clearAll()` empties the query **and** every facet — before v1.1
|
||||
"Clear all" reset the facets while the box kept its text and the grid stayed
|
||||
filtered by it. The atoms live for one page: every navigation is a full
|
||||
document load (docs/02 §6), and the URL is the durable copy (below).
|
||||
|
||||
**Export the atoms WITHOUT the `$` prefix** that nanostores' own docs use.
|
||||
Svelte reserves `$` for store auto-subscription, so `import { $query }` in a
|
||||
@@ -121,35 +150,81 @@ side that gives (found in M3).
|
||||
|
||||
**Where the logic lives.** The composition and sort below are pure functions in
|
||||
`src/lib/filter.ts`, unit-tested without a DOM. `src/lib/grid.ts` is the thin
|
||||
layer that reads the `data-*` facets off the cards and writes `hidden` /
|
||||
`order`. Neither is an island: docs/02 §5 fixes the count at six, so
|
||||
`ShSearch` mounts the grid controller rather than a seventh island existing.
|
||||
layer that reads the `data-*` facets off the cards, toggles `hidden` and
|
||||
reorders the card nodes. Neither is an island: docs/02 §5 fixes the count at
|
||||
six, so `ShSearch` mounts the grid controller rather than a seventh island
|
||||
existing.
|
||||
|
||||
Reordering uses **CSS `order`, not DOM moves** — moving nodes on every
|
||||
keystroke would drop focus and restart the entrance animation.
|
||||
Reordering uses **real DOM moves** (`insertBefore`, walking the desired
|
||||
order against the live child list so an unchanged order costs zero writes)
|
||||
and never `el.style.*`. An earlier version set `el.style.order`, which CSP
|
||||
`style-src` silently refuses — sorting was broken in production while every
|
||||
build gate passed (2026-07-30, docs/15 §4). DOM moves also keep tab order
|
||||
equal to visual order; nothing is lost, because cards carry no entrance
|
||||
animation and every control that drives the grid lives outside it.
|
||||
|
||||
**Where the facet data comes from.** Every card wrapper is server-rendered
|
||||
with `data-slug`, `data-categories`, `data-platforms`, `data-pricing`,
|
||||
`data-added` (docs/06 §6). The filter island reads those attributes and
|
||||
nothing else. This matters: `/search-index.json` is lazy-loaded on first
|
||||
search interaction, so filtering and sorting **must not depend on it** — a
|
||||
user who only clicks facets never triggers that fetch, and one who filters
|
||||
before the index lands must still get correct results.
|
||||
with `data-slug`, `data-name`, `data-categories`, `data-platforms`,
|
||||
`data-pricing`, `data-added` (docs/06 §6). The grid controller reads those
|
||||
attributes and nothing else. This matters: `/search-index.json` is
|
||||
lazy-loaded on first search interaction, so filtering and sorting **must not
|
||||
depend on it** — a user who only clicks facets never triggers that fetch,
|
||||
and one who filters before the index lands must still get correct results.
|
||||
|
||||
```
|
||||
visible = searchResults(query) // A2, or ALL if query empty
|
||||
∩ (categories empty ? ALL : app.categories ∩ selected ≠ ∅)
|
||||
∩ (platforms empty ? ALL : app.platforms ∩ selected ≠ ∅)
|
||||
∩ (pricing empty ? ALL : app.pricing ∈ selected)
|
||||
sorted: name → localeCompare on normalizeViet(name)
|
||||
added → addedAt desc, tiebreak name
|
||||
sorted: name → compareNames(a.name, b.name)
|
||||
added → addedAt desc, tiebreak compareNames
|
||||
relevance → MiniSearch rank; unranked cards fall back to compareNames
|
||||
```
|
||||
|
||||
**`compareNames`** is `Intl.Collator('en', { sensitivity: 'base', numeric:
|
||||
true })` over `normalizeViet(name)` (keys cached per name). It is THE name
|
||||
order wherever a list is sorted by name — the grid, category pages
|
||||
(`byAddedDesc` in `src/lib/paths.ts`) and the detail page's "More in
|
||||
<category>" — so they cannot disagree. Pinned to `en` on purpose: a bare
|
||||
`localeCompare()` collates by the visitor's browser locale (a Czech browser
|
||||
moved 81 of 326 cards, because "ch" sorts after "h" there) or, at build time,
|
||||
by whatever ICU default the build machine has. `numeric` puts "7-Zip" before
|
||||
"10…". The server renders `/apps` in the same A–Z order, so hydration never
|
||||
reshuffles the grid.
|
||||
|
||||
Semantics: **OR within a facet, AND across facets** (industry-standard
|
||||
faceting). The grid is fully server-rendered; filtering toggles `hidden` on
|
||||
card wrappers via slug lookup — no client re-render of card content, so
|
||||
disabled-JS users still see everything (docs/03 §8). Result count is
|
||||
announced via `aria-live="polite"`.
|
||||
disabled-JS users still see everything (docs/03 §8).
|
||||
|
||||
**Result count.** `#sh-count` is server-rendered with the true total and
|
||||
announced via `aria-live="polite"`. It carries one template per plural
|
||||
category (`data-count-one`, `data-count-other`); the controller picks with
|
||||
`Intl.PluralRules(<html lang>)` and formats the number with
|
||||
`Intl.NumberFormat`, and writes only when the text changed (identical text in
|
||||
a live region is re-announced). The empty state (`#sh-empty`) is revealed
|
||||
only once filtering really yields nothing, never while the index loads.
|
||||
|
||||
**View state in the URL** (`src/lib/urlstate.ts`, v1.1). The view
|
||||
round-trips through the query string, so it can be shared, survives a reload
|
||||
and Back, and follows a language switch (`ShLangSwitch` carries
|
||||
`location.search` + `location.hash`):
|
||||
|
||||
```
|
||||
/apps?q=trinh+duyet&cat=browser,utilities&platform=linux&pricing=free&sort=added
|
||||
```
|
||||
|
||||
- `ShSearch` parses it when it mounts (`client:idle`, so a shared link
|
||||
first paints the full grid, then narrows); writes go through
|
||||
`history.replaceState` **300 ms** after the view stops changing — no
|
||||
history entry per keystroke.
|
||||
- Facet values must look like slugs (`^[a-z0-9]+(?:-[a-z0-9]+)*$`); anything
|
||||
else is noise and dropped. Lists are de-duplicated and written in a stable
|
||||
order; `q` is trimmed and capped at 200 characters.
|
||||
- `sort` is written only when the visitor chose it and it is not the
|
||||
default `name`; an automatic "Best match" order is implied by `q`.
|
||||
- `#search` on `/apps` focuses the search box — the welcome page's search
|
||||
field and the header's search hint are links to it.
|
||||
|
||||
## A4 — Feed generation
|
||||
|
||||
@@ -170,35 +245,74 @@ Two implementation notes from M5:
|
||||
asserted by building twice and comparing hashes — `/rss.xml` is byte-
|
||||
identical, while `/api/apps.json` legitimately differs because
|
||||
`generatedAt` is a build timestamp (docs/03 §6).
|
||||
- **The tie-break collator is pinned** — `Intl.Collator('en')`, not a bare
|
||||
`localeCompare()`. Builds run on Workers Builds, GitHub runners and
|
||||
laptops; if two machines' ICU defaults disagreed, the 50-item window could
|
||||
change membership between builds and notify.py would announce apps that
|
||||
are not new. `en` matches the order production served at launch (checked
|
||||
byte-for-byte against the live feed). `/api/apps.json` is likewise sorted
|
||||
by slug in code-unit order, independent of the build machine.
|
||||
|
||||
**`scripts/check-feed.mjs`** (in `pnpm build` since v1.1) asserts what was
|
||||
actually **emitted**, because the guid is injected through `customData` — a
|
||||
seam no unit test sees and a dependency update could break with every test
|
||||
green: 1–50 items; exactly one `<guid isPermaLink="false">` per item holding
|
||||
the slug of an app that exists in `src/data/apps/`; guids unique; `<link>`
|
||||
is that app's page; `<pubDate>` parses and items run newest first.
|
||||
|
||||
## A5 — Console ring buffer
|
||||
|
||||
```ts
|
||||
// src/lib/ringbuffer.ts — module-level singleton, ~30 LOC
|
||||
const CAP = 20;
|
||||
const buf: string[] = [];
|
||||
function push(line: string) {
|
||||
buf.push(`[${new Date().toISOString()}] ${line}`.slice(0, 500));
|
||||
if (buf.length > CAP) buf.shift();
|
||||
}
|
||||
window.addEventListener('error', (e) =>
|
||||
push(`error: ${e.message} @ ${e.filename}:${e.lineno}`));
|
||||
window.addEventListener('unhandledrejection', (e) =>
|
||||
push(`unhandledrejection: ${String(e.reason).slice(0, 400)}`));
|
||||
export const getBuffer = () => buf.join('\n');
|
||||
```js
|
||||
// src/scripts/errors.js — plain classic script (abridged)
|
||||
(() => {
|
||||
var CAP = 20, MAX_LINE = 500;
|
||||
var buf = (window.__shErrors = window.__shErrors || []);
|
||||
var seen = Object.create(null); // one line per distinct failure
|
||||
function push(line) {
|
||||
var key = line.slice(0, 200);
|
||||
if (seen[key]) return;
|
||||
seen[key] = true;
|
||||
buf.push(('[' + new Date().toISOString() + '] ' + location.pathname +
|
||||
' ' + line).slice(0, MAX_LINE));
|
||||
if (buf.length > CAP) buf.shift();
|
||||
}
|
||||
// error (own-origin scripts only) · unhandledrejection (first two stack
|
||||
// lines) · securitypolicyviolation · astro:hydration-error
|
||||
…
|
||||
})();
|
||||
```
|
||||
|
||||
**The buffer cannot live in the island.** `ShBugReport` is `client:visible` in
|
||||
the footer (docs/02 §5), so listeners attached at hydration would miss every
|
||||
error that happened before the user scrolled — which is most of them, and
|
||||
exactly the ones a bug report is about. The listeners therefore ship in
|
||||
`public/errors.js`, loaded `defer` from `Base.astro`, and the two halves meet
|
||||
on `window.__shErrors`; `src/lib/ringbuffer.ts` is only the reader. External
|
||||
file, so no CSP hash is needed (docs/09 §4).
|
||||
`src/scripts/errors.js`, and the two halves meet on `window.__shErrors`;
|
||||
`src/lib/ringbuffer.ts` is only the reader (`getBuffer()`, `bufferSize()`).
|
||||
|
||||
Privacy: captures only exception text from our own origin; never wraps
|
||||
`console.*`, never touches input values, never leaves the page until the
|
||||
user explicitly opens a bug report (A6).
|
||||
**Loaded first, blocking.** `errors.js` is the first script in `<head>`,
|
||||
before `theme.js` and any island bootstrap — until v1.1 it was `defer`red,
|
||||
so it missed exactly the early failures a report needs. `Base.astro`
|
||||
imports it with `?url&no-inline`: a content-hashed, immutable `/_astro/`
|
||||
file covered by `script-src 'self'` with no hash (docs/09 §4).
|
||||
|
||||
What it records, each line stamped with time and page path and
|
||||
de-duplicated so a failure in a loop cannot flush the rest:
|
||||
|
||||
- uncaught errors from **our own origin** — extension and third-party
|
||||
script errors are skipped: not our bugs, and their URLs would reveal which
|
||||
extensions a visitor runs;
|
||||
- unhandled promise rejections;
|
||||
- **CSP violations** (`securitypolicyviolation`). The policy is a `<meta>`
|
||||
tag, which cannot carry `report-uri`/`report-to`, so this event is the
|
||||
only place a refused script or style ever surfaces;
|
||||
- island hydration failures, which Astro catches and re-dispatches as
|
||||
`astro:hydration-error` instead of letting them reach `window.onerror`.
|
||||
|
||||
The footer link shows the count ("3 errors") when the buffer is non-empty.
|
||||
|
||||
Privacy: in-memory only, for the life of the page; never wraps `console.*`,
|
||||
never touches input values, and nothing leaves the page unless the visitor
|
||||
opens a bug report (A6).
|
||||
|
||||
## A6 — Bug-report URL builder
|
||||
|
||||
@@ -208,26 +322,38 @@ in `bug_report.yml` (docs/12 §7).
|
||||
```ts
|
||||
// src/lib/issueUrl.ts
|
||||
const REPO = 'https://github.com/poli0981/softharbor';
|
||||
const BUDGET = 5500; // conservative total-URL budget; verified by spike S3
|
||||
export const BUDGET = 5000; // total-URL budget, measured by spike S3 (below)
|
||||
|
||||
export function buildBugUrl(consoleText: string): string {
|
||||
export function buildBugUrl(consoleText: string, context?: BugContext): string {
|
||||
const ctx = context ?? currentContext(); // { href, userAgent, lang }
|
||||
const u = new URL(`${REPO}/issues/new`);
|
||||
u.searchParams.set('template', 'bug_report.yml');
|
||||
u.searchParams.set('labels', 'bug');
|
||||
u.searchParams.set('page-url', location.href);
|
||||
u.searchParams.set('environment',
|
||||
`${navigator.userAgent} · lang=${document.documentElement.lang}`);
|
||||
// newest lines matter most → truncate from the head
|
||||
u.searchParams.set('page-url', ctx.href);
|
||||
u.searchParams.set('environment', `${ctx.userAgent} · lang=${ctx.lang}`);
|
||||
// Newest lines matter most, so truncate from the head — measured on the
|
||||
// REAL encoded URL, not an estimate.
|
||||
let logs = consoleText;
|
||||
const overhead = () => u.toString().length + encodeURIComponent(logs).length;
|
||||
while (logs.length > 0 && overhead() > BUDGET) {
|
||||
logs = logs.slice(logs.indexOf('\n') + 1 || logs.length);
|
||||
const withLogs = (s: string) => {
|
||||
const probe = new URL(u.toString());
|
||||
probe.searchParams.set('console-output', s || '(buffer empty)');
|
||||
return probe.toString();
|
||||
};
|
||||
while (logs.length > 0 && withLogs(logs).length > BUDGET) {
|
||||
const nl = logs.indexOf('\n');
|
||||
logs = nl === -1 ? '' : logs.slice(nl + 1);
|
||||
}
|
||||
u.searchParams.set('console-output', logs || '(buffer empty)');
|
||||
return u.toString();
|
||||
}
|
||||
```
|
||||
|
||||
`ShBugReport` rebuilds the URL on hover, focus and click — it embeds the
|
||||
*current* page and buffer — and renders a real `<a target="_blank">`, so the
|
||||
visitor can see, copy or middle-click the target. Opening it sends the
|
||||
prefilled fields to GitHub as URL parameters; nothing is filed until the
|
||||
visitor submits the form (docs/09 §8).
|
||||
|
||||
**`BUDGET = 5000`** — measured by spike S3 against github.com (2026-07-27,
|
||||
two probes per length):
|
||||
|
||||
@@ -249,43 +375,142 @@ an observation, not a standard.
|
||||
## A7 — Legal-gate version check
|
||||
|
||||
```ts
|
||||
export const LEGAL_VERSION = '2026-07-15'; // bump when any legal doc changes
|
||||
// src/lib/legal.ts (abridged)
|
||||
/** Version of the ACCEPTED set — bump when one of those three changes. */
|
||||
export const LEGAL_VERSION = '2026-10-21';
|
||||
export const ACCEPTED_DOCS = ['disclaimer', 'privacy', 'terms'] as const;
|
||||
/** Each document's own "Last updated" (docs/14 Part 2). */
|
||||
export const LEGAL_UPDATED: Readonly<Record<LegalDoc, string>> = { /* six dates */ };
|
||||
|
||||
const KEY = 'sh:legal';
|
||||
export const isAccepted = () => localStorage.getItem(KEY) === LEGAL_VERSION;
|
||||
export const accept = () => localStorage.setItem(KEY, LEGAL_VERSION);
|
||||
const MEM_KEY = '__shLegalAcceptedThisSession'; // on globalThis
|
||||
|
||||
export function isAccepted(): boolean {
|
||||
if (globalThis[MEM_KEY] === true) return true;
|
||||
try { return localStorage.getItem(KEY) === LEGAL_VERSION; }
|
||||
catch { return false; }
|
||||
}
|
||||
export function acceptLegal(): void {
|
||||
globalThis[MEM_KEY] = true;
|
||||
try { localStorage.setItem(KEY, LEGAL_VERSION); } catch { /* memory carries it */ }
|
||||
}
|
||||
```
|
||||
|
||||
Any value ≠ current version (including old versions) re-opens the gate.
|
||||
Route exemptions and dialog behavior: docs/14 §2. localStorage failures
|
||||
(private mode with storage disabled) fail open *per session*: gate shows
|
||||
once, acceptance held in memory.
|
||||
Any value ≠ current version re-opens the gate — old versions, *newer*
|
||||
versions and garbage alike: equality, never `startsWith`, never ordering.
|
||||
localStorage failures (private mode with storage disabled) fail open *per
|
||||
session*: the gate shows once and acceptance is held in memory. The memory
|
||||
flag lives on `globalThis`, not in a module-local `let`, because its real
|
||||
scope is the session — a module-local also leaked acceptance between tests.
|
||||
|
||||
**Exemptions are declared by the page**, not computed from the path: a page
|
||||
passes `gateExempt` to `Base.astro` and the island is simply not rendered
|
||||
(legal documents, contact, 404, offline, error templates — docs/14 Part 2).
|
||||
The old path regex never matched the cases that mattered: Workers serves
|
||||
`404.html` at whatever URL was requested, and the service worker serves the
|
||||
offline page at the URL that failed.
|
||||
|
||||
Version policy (bump rule, per-document dates, the test that enforces it):
|
||||
docs/14 Part 2. The gate's second step — the human check — is §A9.
|
||||
|
||||
## A8 — Theme resolution (no-flash)
|
||||
|
||||
`public/theme.js` — **not** inline. The strict CSP is `script-src 'self'` with
|
||||
no hashes (docs/09 §4, decision D18), so this ships as a real file loaded by a
|
||||
*blocking* tag in `<head>`, before any stylesheet-dependent paint:
|
||||
|
||||
```html
|
||||
<script src="/theme.js"></script> <!-- no defer, no async: must run pre-paint -->
|
||||
```
|
||||
`src/scripts/theme.js` — a real file, **not** inline, loaded by a *blocking*
|
||||
classic `<script src>` in `<head>` (no `defer`, no `async`, no
|
||||
`type=module`), right after `errors.js` and before any stylesheet-dependent
|
||||
paint. `Base.astro` imports it with `?url&no-inline`, so Vite copies it
|
||||
verbatim to a content-hashed `/_astro/theme.<hash>.js`, cached immutably and
|
||||
covered by `script-src 'self'` without a hash (docs/09 §4). (Until v1.1 it
|
||||
was `public/theme.js` at a fixed path with a revalidating cache.)
|
||||
|
||||
```js
|
||||
// public/theme.js — plain classic script, not a module (modules are deferred).
|
||||
// src/scripts/theme.js — plain classic script (abridged)
|
||||
(() => {
|
||||
const s = localStorage.getItem('sh:theme'); // 'light'|'dark'|null
|
||||
const dark = s ? s === 'dark'
|
||||
: matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
document.documentElement.dataset.theme = dark ? 'dark' : 'light';
|
||||
const read = (key) => { try { return localStorage.getItem(key); }
|
||||
catch { return null; } }; // storage may THROW
|
||||
const root = document.documentElement;
|
||||
const theme = read('sh:theme'); // 'light'|'dark'|null
|
||||
const explicit = theme === 'light' || theme === 'dark' ? theme : null;
|
||||
const dark = explicit ? explicit === 'dark'
|
||||
: matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
root.dataset.theme = dark ? 'dark' : 'light';
|
||||
const scrollbar = read('sh:scrollbar'); // 'thin'|'hidden'|null
|
||||
if (scrollbar === 'thin' || scrollbar === 'hidden') root.dataset.scrollbar = scrollbar;
|
||||
if (read('sh:motion') === 'reduce') root.dataset.motion = 'reduce';
|
||||
// + marks View Transition promises handled on pageswap/pagereveal
|
||||
})();
|
||||
```
|
||||
|
||||
A render-blocking same-origin script in `<head>` runs before first paint just
|
||||
as an inline one does, so there is no theme flash — the only cost is one
|
||||
request, which is cached and HTTP/2-multiplexed. This file lives in `public/`
|
||||
(copied verbatim to `dist/`) so it is never bundled, hashed, or renamed; the
|
||||
`<script src>` path is therefore stable.
|
||||
as an inline one does, so there is no flash of the wrong theme, scrollbar or
|
||||
motion — the cost is one request, cached immutably. Storage reads are
|
||||
guarded: with site data blocked localStorage *throws*, and an unguarded read
|
||||
used to abort the script and leave dark-OS visitors on the light theme.
|
||||
Unknown or garbage values mean "the default". With scripting off there is no
|
||||
`data-theme` at all and the CSS's `prefers-color-scheme` block applies — kept
|
||||
identical to the dark theme by test (docs/06 §2).
|
||||
|
||||
`ShThemeToggle` cycles system → light → dark (writes/clears `sh:theme`) and
|
||||
keeps `data-theme` in sync with a `change` listener on the media query while
|
||||
in system mode.
|
||||
**The display menu (`ShPrefs`, v1.1)** replaced `ShThemeToggle`: one icon
|
||||
button opens a popover (`popover="auto"`) with three radio groups.
|
||||
|
||||
| Choice | Values | Storage | Applied as |
|
||||
|---|---|---|---|
|
||||
| Theme | system · light · dark | `sh:theme` (key removed for system) | `html[data-theme]` |
|
||||
| Scrollbar | default · thin · hidden | `sh:scrollbar` (removed for default) | `html[data-scrollbar]` |
|
||||
| Motion | system · reduce | `sh:motion` (removed for system) | `html[data-motion]` |
|
||||
|
||||
- While the theme is `system` it follows the OS live (`change` on the
|
||||
media query); an explicit choice stops that.
|
||||
- A `storage` event from another tab re-applies the changed preference here.
|
||||
- "Hidden" removes the scrollbar, never the scrolling; under forced colours
|
||||
the bar is handed back to the system.
|
||||
- The rules are written twice — typed in `src/lib/theme.ts` /
|
||||
`src/lib/prefs.ts` for the island, plain in `theme.js` for pre-paint (it
|
||||
ships unbundled and cannot import). `prefs.test.ts` runs the real script
|
||||
to keep the two identical.
|
||||
- The same island owns the global **`/` shortcut** off `/apps`: it goes to
|
||||
`/apps#search` (on `/apps` `ShSearch` focuses its own box). It never fires
|
||||
inside a text field or while the legal gate is open
|
||||
(`body[data-sh-gate="open"]`, docs/06 §9).
|
||||
|
||||
## A9 — Gate step 2: the human check (`sh:human`)
|
||||
|
||||
The browser half of D25 (`src/lib/turnstile.ts`, `src/lib/human.ts`; the
|
||||
server half and its threat model are docs/09 §4a).
|
||||
|
||||
```
|
||||
gate mounts ─▶ !isAccepted() → step 1 (documents) ─ accept ─┐
|
||||
─▶ accepted ∧ !isHuman() → step 2 directly │
|
||||
─▶ accepted ∧ isHuman() → closed │
|
||||
▼
|
||||
step 2: load api.js (once) ─▶ render Managed widget ─▶ token ─▶ POST /api/verify
|
||||
200 → rememberHuman(48 h) → close
|
||||
anything else→ rememberHuman(1 h) → "check skipped" (1.5 s) → close
|
||||
```
|
||||
|
||||
- **Never before acceptance.** `api.js` is injected only when step 2
|
||||
starts — the documents describing Turnstile are accepted first. One
|
||||
injection per page, shared by concurrent callers; a failed load is
|
||||
forgotten so a later attempt can retry.
|
||||
- **Widget:** `sitekey` `0x4AAAAAAFfEB-RvBz18M-UK` (public by design);
|
||||
Cloudflare's always-pass test sitekey on `localhost`, `127.0.0.1` and
|
||||
`[::1]`. `action: 'legal_gate'` (must equal the Worker's), `appearance:
|
||||
'interaction-only'` (most people never see it), the page's theme and
|
||||
language, `retry: 'never'`, `response-field: false` (no form — the token
|
||||
travels in our own JSON body).
|
||||
- **Timeouts:** 10 s for the whole check; once the widget asks for a click
|
||||
(`before-interactive-callback`) the person gets 120 s instead. The POST
|
||||
itself times out after 8 s.
|
||||
- **Retries:** a `403` (token rejected — spent, stale, minted elsewhere) is
|
||||
answered with a fresh challenge (`reset`), up to 3 attempts. `429`, `503`,
|
||||
a network failure, a widget error, "unsupported" or a timeout all resolve
|
||||
to *unverified* at once. Every path resolves exactly once; none throws.
|
||||
- **`sh:human`** stores an **expiry timestamp** (ms), so the lifetime is
|
||||
decided when the check ends: `PASS_TTL_MS` = 48 h after a pass,
|
||||
`UNVERIFIED_TTL_MS` = 1 h after the gate let someone through unchecked —
|
||||
short enough that an outage is retried soon, long enough not to ask on
|
||||
every page. `isHuman()` rejects values further out than 48 h (not written
|
||||
by us), garbage and the past. Storage failures fall back to a
|
||||
`globalThis` copy for the page, like §A7.
|
||||
- A returning visitor whose check has lapsed sees step 2 only; the
|
||||
documents are not re-shown unless `LEGAL_VERSION` changed.
|
||||
+282
-123
@@ -2,37 +2,71 @@
|
||||
|
||||
## 1. Design direction
|
||||
|
||||
**"Quiet editorial, soft-brutalist."** Warm paper background, ink text, one
|
||||
harbor-blue accent, visible 2 px borders, offset shadows on hover, generous
|
||||
whitespace, type doing the personality work. Explicitly banned: purple/blue
|
||||
AI-gradient hero, glassmorphism blur cards, stock 3D illustrations, emoji as
|
||||
UI icons, more than one accent hue.
|
||||
**"Harbor" (v1.1) — a harbour master's ledger.** Cool chart paper and navy
|
||||
ink by day, a night harbour by night; one harbour-blue accent; hairline
|
||||
rules, soft layered shadows, mono labels for the data, generous whitespace,
|
||||
and type doing the personality work. The welcome hero carries depth
|
||||
contours drawn in pure CSS. This replaced v1.0's "quiet editorial,
|
||||
soft-brutalist" look — the warm paper, 2 px ink borders and *offset* hover
|
||||
shadows are gone.
|
||||
|
||||
Explicitly banned: purple/blue AI-gradient hero, glassmorphism cards (blur
|
||||
is reserved for the sticky header and the modal backdrop), stock 3D
|
||||
illustrations, emoji as UI icons, more than one accent hue, colour as the
|
||||
only carrier of meaning (status icons differ in shape too — §6).
|
||||
|
||||
The site should feel like a well-set reference book you happen to be able to
|
||||
search — calm, dense with information, quietly confident.
|
||||
|
||||
## 2. Design tokens
|
||||
|
||||
Defined once in `src/styles/global.css` via Tailwind v4 `@theme`; every
|
||||
color is a `--sh-*` custom property switched by `html[data-theme]`.
|
||||
Defined once in `src/styles/global.css`; every colour is a `--sh-*` custom
|
||||
property switched by `html[data-theme]`, and Tailwind v4's `@theme` exposes
|
||||
each one as a utility (`--color-sh-muted` → `text-sh-muted`,
|
||||
`bg-sh-surface`, `border-sh-control`, `shadow-sh-2`, …). Utilities — never a
|
||||
`style=` attribute, which CSP `style-src` drops silently (docs/09 §4).
|
||||
|
||||
| Token | Light | Dark | Use |
|
||||
| Token | Light "chart paper" | Dark "night harbour" | Use |
|
||||
|---|---|---|---|
|
||||
| `--sh-bg` | `oklch(0.97 0.01 85)` warm paper | `oklch(0.19 0.01 85)` warm near-black | page background |
|
||||
| `--sh-surface` | `oklch(0.99 0.005 85)` | `oklch(0.23 0.012 85)` | cards, sheets, dialogs |
|
||||
| `--sh-ink` | `oklch(0.22 0.015 75)` | `oklch(0.93 0.008 85)` | primary text, borders |
|
||||
| `--sh-muted` | `oklch(0.48 0.012 75)` | `oklch(0.70 0.01 85)` | secondary text |
|
||||
| `--sh-accent` | `oklch(0.52 0.11 235)` harbor blue | `oklch(0.72 0.10 235)` | links, active filters, focus |
|
||||
| `--sh-accent-ink` | `oklch(0.98 0.005 235)` | `oklch(0.16 0.02 235)` | text on accent |
|
||||
| `--sh-ok` | `oklch(0.55 0.12 150)` | `oklch(0.72 0.12 150)` | "clean" status |
|
||||
| `--sh-warn` | `oklch(0.62 0.13 75)` | `oklch(0.75 0.12 75)` | "unverified" status |
|
||||
| `--sh-danger` | `oklch(0.55 0.19 25)` | `oklch(0.68 0.17 25)` | destructive/flag copy only |
|
||||
| `--sh-border` | = ink | = `oklch(0.42 0.012 85)` | 2 px borders |
|
||||
| `--sh-bg` | `oklch(0.975 0.007 230)` | `oklch(0.17 0.03 255)` | page background |
|
||||
| `--sh-surface` | `oklch(0.995 0.003 230)` | `oklch(0.205 0.034 255)` | cards, panels, dialogs |
|
||||
| `--sh-surface-2` | `oklch(0.952 0.012 232)` | `oklch(0.245 0.036 255)` | tiles, pills, hover fills |
|
||||
| `--sh-ink` | `oklch(0.24 0.035 252)` navy | `oklch(0.94 0.012 230)` | primary text |
|
||||
| `--sh-muted` | `oklch(0.47 0.03 250)` | `oklch(0.75 0.025 240)` | secondary text, placeholders |
|
||||
| `--sh-accent` | `oklch(0.5 0.13 245)` harbour blue | `oklch(0.77 0.11 230)` | links, active state, focus, primary buttons |
|
||||
| `--sh-accent-ink` | `oklch(0.985 0.005 240)` | `oklch(0.18 0.04 255)` | text on accent |
|
||||
| `--sh-accent-soft` | `oklch(0.94 0.03 240)` | `oklch(0.27 0.05 245)` | accent tint (icon tiles, selection) |
|
||||
| `--sh-ok` / `-ok-soft` | `oklch(0.5 0.12 155)` / `oklch(0.95 0.035 155)` | `oklch(0.78 0.13 155)` / `oklch(0.27 0.045 160)` | "clean" status, `free` chip |
|
||||
| `--sh-warn` / `-warn-soft` | `oklch(0.53 0.12 62)` / `oklch(0.95 0.04 75)` | `oklch(0.82 0.12 78)` / `oklch(0.28 0.045 70)` | "unverified" status, `onetime` chip |
|
||||
| `--sh-danger` | `oklch(0.52 0.18 25)` | `oklch(0.74 0.15 25)` | destructive/flag copy only |
|
||||
| `--sh-border` | `oklch(0.88 0.014 240)` | `oklch(0.31 0.03 252)` | **hairline**: separates and frames, never a control's only edge |
|
||||
| `--sh-control` | `oklch(0.6 0.035 248)` | `oklch(0.6 0.03 245)` | visible boundary of inputs, selects, buttons (≥ 3:1, WCAG 1.4.11) |
|
||||
| `--sh-contour` | accent at 14 % | accent at 16 % | welcome-hero depth contours |
|
||||
| `--sh-shadow-1/2/3` | navy-tinted, soft | black, deeper | rest · hover lift · overlays (dialogs, popover) |
|
||||
|
||||
Shape & depth: radius `10px` (cards) / `999px` (pills); border `2px solid
|
||||
var(--sh-border)`; hover shadow `4px 4px 0 var(--sh-border)` (offset, not
|
||||
blurred — the soft-brutalist tell); focus ring `2px` accent, `2px` offset.
|
||||
Spacing: Tailwind default 4 px scale; page gutter `16px` mobile / `24px` ≥ md.
|
||||
Shape & depth: radii `--radius-card` **14px** · `--radius-tile` **12px** ·
|
||||
`--radius-btn` **10px** · `--radius-pill` 999px; borders are **1px**
|
||||
(`--sh-border` hairline for framing, `--sh-control` for anything you can
|
||||
operate); shadows are blurred and layered (`shadow-1` at rest, `shadow-2`
|
||||
on hover lift, `shadow-3` for the gate, the filter sheet and the display
|
||||
menu); focus ring `2px` accent, `2px` offset. Scrollbar colours derive from
|
||||
`--sh-ink` (`color-mix`), so they follow the theme. Spacing: Tailwind
|
||||
default 4 px scale; page gutter `16px` mobile / `24px` ≥ md.
|
||||
|
||||
**Dark mode with JS off.** `theme.js` sets `data-theme` pre-paint (docs/05
|
||||
§A8); with scripting disabled there is no attribute, and a
|
||||
`@media (prefers-color-scheme: dark) { :root:not([data-theme]) { … } }`
|
||||
block applies instead. That block must stay *identical* to
|
||||
`:root[data-theme='dark']` — `src/styles/contrast.test.ts` compares them.
|
||||
|
||||
**Contrast is a test, not a review item.** `contrast.test.ts` reads
|
||||
`global.css`, converts each OKLCH token the way browsers do (OKLab → linear
|
||||
sRGB, gamut-clipped) and checks WCAG 2.2 ratios in **both** themes: `ink` ≥
|
||||
7:1 and `muted`, `accent`, `ok`, `warn`, `danger` ≥ 4.5:1 on `bg`,
|
||||
`surface` and `surface-2`; `control` ≥ 3:1 on all three; `accent-ink` on
|
||||
`accent`, `ok` on `ok-soft`, `accent` on `accent-soft`, `warn` on
|
||||
`warn-soft` and `ink` on `accent-soft` ≥ 4.5:1. A colour tweak that breaks
|
||||
legibility fails `pnpm test`.
|
||||
|
||||
## 3. Typography
|
||||
|
||||
@@ -42,52 +76,91 @@ Spacing: Tailwind default 4 px scale; page gutter `16px` mobile / `24px` ≥ md.
|
||||
| Body / UI | **Be Vietnam Pro** 400 · 500 · 700 | Designed for Vietnamese; excellent diacritic rendering |
|
||||
| Badges / dates / SPDX ids | **IBM Plex Mono** 400 · 500 | Vietnamese subset; gives data a "spec sheet" texture |
|
||||
|
||||
Import only `latin` + `vietnamese` subsets from Fontsource;
|
||||
`font-display: swap`. Fallback stacks end in `system-ui` / `monospace`.
|
||||
Scale (desktop → mobile): display 44/36 · h1 32/28 · h2 24/22 · h3 19/18 ·
|
||||
body 16 · small 14 · mono-badge 12.5. Line-height 1.6 body, 1.15 display.
|
||||
Vietnamese check: stacked diacritics (ậ, ễ, ữ) must not clip at any size —
|
||||
add to visual QA.
|
||||
Unchanged by the v1.1 refresh. Be Vietnam Pro (400/500/700) and IBM Plex
|
||||
Mono (400/500) are imported per subset, `latin` + `vietnamese` only.
|
||||
Bricolage's variable package ships one stylesheet covering vietnamese,
|
||||
latin-ext and latin; each `@font-face` carries a `unicode-range`, so a
|
||||
browser still downloads only the subsets a page uses. `font-display: swap`;
|
||||
fallback stacks end in `system-ui` / `monospace`.
|
||||
|
||||
Scale, as `--text-*` tokens (desktop → mobile below 40 rem): hero 64/42
|
||||
(welcome headline only) · display 44/36 · h1 36/30 · h2 24/22 · h3 19/18 ·
|
||||
body 16 · small 14 · badge 12.5. Line-height 1.6 body, 1.15 headings;
|
||||
headings use `text-wrap: balance`. Vietnamese check: stacked diacritics (ậ,
|
||||
ễ, ữ) must not clip at any size — add to visual QA.
|
||||
|
||||
## 4. Global layout
|
||||
|
||||
**Header (sticky):** wordmark `SoftHarbor` (Bricolage; the "H" may carry a
|
||||
subtle anchor-shaped counter — optional flourish) · nav `Apps · Categories`
|
||||
· search shortcut hint `/` (opens/focuses search on any page) ·
|
||||
`ShLangSwitch` (`EN | VI` text toggle) · `ShThemeToggle`.
|
||||
**Header (sticky, frosted glass):** `.sh-glass` — the page background at
|
||||
80 % with `backdrop-filter: blur(14px) saturate(1.4)` over a hairline
|
||||
bottom rule; without `backdrop-filter` support it is simply opaque. Left to
|
||||
right: the **anchor mark** on an accent tile + wordmark `SoftHarbor`
|
||||
(Bricolage; the wordmark hides below `sm`, a screen-reader name stays) ·
|
||||
nav `Apps · Categories` with Lucide icons, the current section marked by
|
||||
`aria-current="page"` and a short accent underline (not colour alone) · a
|
||||
search hint styled as a field with a `/` key cap (`lg`+; a real link to
|
||||
`/apps#search`) · `ShLangSwitch` (segmented `EN | VI`) · `ShPrefs` (display
|
||||
menu icon button, docs/05 §A8).
|
||||
|
||||
**Footer:** legal links (Disclaimer · Privacy · Terms · Trademarks ·
|
||||
Third-party) · license line "Code GPL-3.0 · Data CC BY-SA 4.0" · GitHub link
|
||||
· `ShBugReport` ("Report a bug") · build date.
|
||||
**Footer — five columns** (two on phones): **brand** (mark, tagline, license
|
||||
line "Code GPL-3.0 · Data CC BY-SA 4.0", build date) · **Browse** (Apps,
|
||||
Categories, Search) · **Open data** (`/api/apps.json`, `/rss.xml`, the CC
|
||||
BY-SA 4.0 data licence) · **Legal** (all six documents) · **Project**
|
||||
(Contact, GitHub ↗, Releases ↗, `ShBugReport` "Report a bug").
|
||||
|
||||
## 5. Pages
|
||||
|
||||
**Welcome `/`** — one-line pitch + subline (dictionary keys
|
||||
`welcome.hero`), primary button → `/apps`; 12 category tiles (icon + label +
|
||||
count); "Latest additions" row (5 newest cards); short "How this list
|
||||
works" strip: official links only · free or own-once · dated security
|
||||
status, each linking to the relevant legal/about text.
|
||||
**Welcome `/`** — no island at all. **Hero** over the depth contours
|
||||
(`.sh-contours`: repeating radial rings plus a dot grid, masked to fade,
|
||||
kept inside the section so it can never widen a phone's layout viewport):
|
||||
eyebrow, headline at `--text-hero`, subline, a **search field that is a
|
||||
link** to `/apps#search` ("Search 326 apps…" with a `/` key cap — the real
|
||||
search is the island on `/apps`), and two buttons: Browse all apps
|
||||
(primary) · All categories. Beside it, the **"Manifest" ledger**: figures
|
||||
counted from the data at build time — apps listed, completely free, buy
|
||||
once, no known warnings, and per-platform counts — in ruled mono rows.
|
||||
Then the **12-category grid** (icon tile, label, localized count, stretched
|
||||
link) and **"How this list works"** — three numbered principles (01 official
|
||||
links only · 02 free or own it once · 03 dated, honest status). The v1.0
|
||||
"Latest additions" row was dropped in the refresh (every entry still shares
|
||||
the seed's `addedAt`, 2026-07-28); `/rss.xml` remains the new-entries
|
||||
channel.
|
||||
|
||||
**Grid `/apps`** — toolbar: search input (`ShSearch`, placeholder
|
||||
"Search apps… (/)"), filter button with active-count chip (`ShFilterSheet`),
|
||||
sort select (A–Z · Newest). Result count line (`aria-live`). Card grid §6.
|
||||
Empty state: friendly line + "Clear filters" + "Suggest this app →"
|
||||
(app-request issue form).
|
||||
**Grid `/apps`** — eyebrow + h1 + one-line intro ("Every link goes to the
|
||||
developer's official page…"); toolbar: search input (`ShSearch`, search
|
||||
icon, placeholder "Search apps… ( / )"), sort select (A–Z · Newest, plus
|
||||
"Best match" while a query is active — docs/05 §A2), filter button with an
|
||||
active-count chip (`ShFilterSheet`). Result count line (`aria-live`,
|
||||
plural-aware). Card grid §6. Empty state, hidden until filtering yields
|
||||
nothing: "No apps match. Try fewer filters or a different word."
|
||||
|
||||
**Filter sheet** — desktop: right-side panel; mobile: bottom sheet
|
||||
(`<dialog>`). Facets: Category (checkbox list with icons), Platform
|
||||
(Windows/macOS/Linux), Pricing (Free / Free + one-time / One-time). Footer:
|
||||
"Clear all" + "Show N apps".
|
||||
**Filter sheet** — native `<dialog>` (`showModal`): full-height right-side
|
||||
panel (24 rem) from 640 px up, a bottom sheet (max 80 dvh) below. Facets:
|
||||
Category (registry order, localized labels), Platform (Windows/macOS/Linux),
|
||||
Pricing (Free / Free + one-time / One-time). Footer: "Clear all" (disabled
|
||||
when nothing is active; also clears the query) + "Show N apps" — the visible
|
||||
text *is* the accessible name (WCAG 2.5.3), pluralised.
|
||||
|
||||
**Detail `/apps/[slug]`** — breadcrumb (primary category); header: logo
|
||||
64 px + name (h1, `transition:name={slug}`) + **developer line** directly
|
||||
under the h1 (`detail.developer` label + `developer` value, muted, body
|
||||
weight) + pricing & license badges; summary paragraph; **link rail** of three
|
||||
equal bordered buttons: Homepage ↗ · Repository ↗ (hidden when null) ·
|
||||
Download ↗ (accent-filled — the page's one loud element); meta block (mono):
|
||||
platforms · tags · security line · added/updated dates; footer note: "Links
|
||||
go to the official site. SoftHarbor hosts no downloads." + "Report an issue
|
||||
with this entry".
|
||||
**Categories `/categories`** — one tile per category: icon, name, count and
|
||||
the first three app names (name order), so a tile says what is inside
|
||||
before the click.
|
||||
|
||||
**Category `/categories/[id]`** — back link to Categories, icon tile + h1
|
||||
(the label) + count, then the grid: newest first, name as the tie-break —
|
||||
the `/apps` "Newest" order exactly (docs/05 §A3).
|
||||
|
||||
**Detail `/apps/[slug]`** — breadcrumb (Apps › primary category › name).
|
||||
**Hero panel**: logo on an 80 px tile + name (h1) + **developer line**
|
||||
directly under the h1 (the `developer` value, muted) + price chip (toned,
|
||||
§6) and license pill; the summary at h3 size. **Action rail**: Download ↗
|
||||
(accent-filled, *first* — the page's one loud element) · Homepage ↗ ·
|
||||
Repository ↗ (absent when null), then the note "Links go to the official
|
||||
site. SoftHarbor hosts no downloads." **Facts ledger** ("At a glance",
|
||||
`<dl>` in ruled rows): developer · platforms · license · tags · security
|
||||
line · added · updated. **Security-meaning panel** beside it, tinted ok or
|
||||
warn by status, explaining what the status does and does not mean, linking
|
||||
the Disclaimer. **"More in <category>"**: up to four cards from the primary
|
||||
category, name order.
|
||||
|
||||
The **security line carries a "View scan ↗" link** whenever
|
||||
`security.evidence` is set, at any status. Hard rule 4 caps what the copy may
|
||||
@@ -96,33 +169,46 @@ more when the reader can open the scan and judge it. It matters most on an
|
||||
entry held at `unverified` *because* something was found: the link is how a
|
||||
reader sees what, instead of being told only that we were unsure.
|
||||
|
||||
The developer line sits *above* the link rail on purpose: a reader should be
|
||||
able to match "who makes this" against the domain they are about to click.
|
||||
It is plain text, never a link — we do not maintain vendor pages.
|
||||
The developer line sits *above* the action rail on purpose: a reader should
|
||||
be able to match "who makes this" against the domain they are about to
|
||||
click. It is plain text, never a link — we do not maintain vendor pages. (Its
|
||||
label, "Developer", now lives in the facts ledger.)
|
||||
|
||||
**Legal `/legal/*`** — h1, "last updated" stamp, VI courtesy notice on the VI
|
||||
side, then the document. **No inter-document nav in the page body**: the
|
||||
footer already lists all six on every page, and repeating them a screen apart
|
||||
is noise.
|
||||
**Legal `/legal/*`** — eyebrow, h1, the document's own "Last updated" stamp
|
||||
(`LEGAL_UPDATED`, docs/14 Part 2), the fixed VI notice on the VI side, then
|
||||
the document (`.sh-prose`: numbered clauses keep their numbers, links are
|
||||
underlined). **No inter-document nav in the page body**: the footer already
|
||||
lists all six on every page, and repeating them a screen apart is noise.
|
||||
|
||||
**Category `/categories/[id]`** — h1 = label, count, pre-filtered grid.
|
||||
**Contact `/contact`** — one card per purpose (nine `@poli0981.dev`
|
||||
addresses from `src/lib/contacts.ts`, ordered by urgency: security first,
|
||||
press and collaboration last; the DMCA card links Terms `#copyright`), a
|
||||
panel pointing everything else to GitHub issues, and a languages note.
|
||||
Gate-exempt: a security or copyright notice must never wait behind "I
|
||||
understand and accept".
|
||||
|
||||
**Error/offline pages** — same layout family: giant mono status code
|
||||
(clipped, 40 % opacity, behind text), one-line explanation EN+VI, buttons
|
||||
Home / Back. Offline adds "You appear to be offline — SoftHarbor needs a
|
||||
connection to load new pages."
|
||||
**Error/offline pages** — one shared shell (`ErrorPage.astro`), **bilingual
|
||||
on one page** (an error can be reached from either locale, and `/offline`
|
||||
with no network at all): the status code set huge in the ledger's mono,
|
||||
accent at 25 % opacity and `aria-hidden` (`···` for offline), then an EN
|
||||
panel and a `lang="vi"` panel side by side, each with an icon tile, title
|
||||
and explanation from the dictionaries (`error.<kind>.*`). Buttons: Home ·
|
||||
Apps · Trang chủ (VI home). All are `noindex` — `/404` requested directly is
|
||||
a 200 — gate-exempt, and emit no hreflang alternates.
|
||||
|
||||
## 6. Card anatomy
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────┐
|
||||
│ [logo 40px] Name (7-Zip) │ name: 600, 17px
|
||||
│ ⊞ ⌘ 🐧 FREE LGPL-2.1 │ platform icons + pills
|
||||
│ File archiver with high-ratio 7z │ summary, 2-line clamp,
|
||||
│ compression and support for dozens… │ muted
|
||||
│ ── ── ── ── ── ── ── ── ── ── ── ── ── │
|
||||
│ ● No known warnings · checked 2026-07-15 │ status dot: ok/warn color
|
||||
│ file-management · utilities │ category chips (link)
|
||||
│ ┌────┐ 7-Zip [FREE] │ 48px logo tile · name
|
||||
│ │logo│ Igor Pavlov │ (h2, 17px, 600) · developer
|
||||
│ └────┘ │ (muted, truncated) · price chip
|
||||
│ File archiver with high-ratio 7z │ summary, 2-line clamp,
|
||||
│ compression and support for dozens… │ muted
|
||||
│ [LGPL-2.1-or-later] ▭ Windows · Linux │ SPDX pill · platforms
|
||||
│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ │ dashed rule
|
||||
│ ⛉✓ No known warnings · checked 30 Jul 2026 │ shield icon + status (mono)
|
||||
│ File Management Utilities │ category chips (links)
|
||||
└──────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
@@ -130,74 +216,147 @@ connection to load new pages."
|
||||
inside another `<a>` is invalid HTML: the parser *closes* the outer anchor
|
||||
when it meets the inner one, so the card link silently breaks and the
|
||||
"A11y = 100" gate (docs/13 §2) cannot pass. Use the standard pattern
|
||||
instead — the card is an `<article class="relative">`, the **app title** is
|
||||
the only link to the detail page and carries the overlay:
|
||||
instead — the card is an `<article class="relative">`, the **app name** is
|
||||
the only link to the detail page and carries the overlay
|
||||
(`global.css`):
|
||||
|
||||
```css
|
||||
.sh-card-title a::after { content: ''; position: absolute; inset: 0; }
|
||||
.sh-card a:not(.sh-card-title a) { position: relative; z-index: 1; }
|
||||
.sh-stretch::after { content: ''; position: absolute; inset: 0; }
|
||||
```
|
||||
|
||||
Category chips are then ordinary **sibling** links that sit above the
|
||||
overlay and navigate normally. One card = one primary link in the
|
||||
accessibility tree; platform icons carry `aria-label`.
|
||||
- Each card wrapper carries the facet data the filter island needs (docs/05
|
||||
§A3): `data-slug`, `data-categories`, `data-platforms`, `data-pricing`,
|
||||
`data-added`. These are the **only** source filtering reads, so sorting and
|
||||
filtering work before `/search-index.json` has loaded — and keep working if
|
||||
the user never touches search.
|
||||
- Pills: pricing (`FREE` ink-on-paper / `ONE-TIME` accent outline /
|
||||
`FREE + ONE-TIME`) and SPDX id (mono) only when open source.
|
||||
Category chips are then ordinary **sibling** links raised above the
|
||||
overlay (`relative z-1`) and navigate normally. One card = one primary
|
||||
link in the accessibility tree. The name is an `h2` on `/apps` and
|
||||
category pages and an `h3` inside "More in <category>", so no page skips
|
||||
a heading level.
|
||||
- Each card wrapper carries the facet data the grid controller needs
|
||||
(docs/05 §A3): `data-slug`, `data-name`, `data-categories`,
|
||||
`data-platforms`, `data-pricing`, `data-added`. These are the **only**
|
||||
source filtering and sorting read, so both work before
|
||||
`/search-index.json` has loaded — and keep working if the user never
|
||||
touches search.
|
||||
- **Price chip, toned by pricing:** `free` → ok (green) · `free-onetime` →
|
||||
accent (blue) · `onetime` → warn (amber), each text-on-tint pair ≥ 4.5:1
|
||||
(§2). Localized labels (`FREE`, `FREE + ONE-TIME`, `ONE-TIME`). SPDX id
|
||||
as a neutral mono pill, only when open source. Platforms as a monitor icon
|
||||
plus the platform names — words, not glyphs.
|
||||
- Security line copy (exact, both locales in dictionaries). **Each string
|
||||
renders the date field it actually names** — the dated-honesty claim is the
|
||||
product (hard rule 4), so the words and the data must not drift apart:
|
||||
`clean` → "No known warnings · checked {date}" ← `security.checkedAt` ·
|
||||
`unverified` → "Not yet verified · listed {date}" ← **`addedAt`** ·
|
||||
`flagged` → never rendered (quarantined before build).
|
||||
- States: hover = translate(-2px,-2px) + offset shadow; focus-visible =
|
||||
accent ring; filtered-out = `hidden` attr (A3).
|
||||
`flagged` → never rendered (quarantined before build). The status icon
|
||||
differs in **shape and colour** — `shield-check` in ok, `shield-question`
|
||||
in warn — so it never rests on colour alone (WCAG 1.4.1).
|
||||
- Category chips print the category **label** in the page's language (they
|
||||
printed the raw id before v1.1).
|
||||
- States: hover (pointer devices only) = `translateY(-2px)` + `shadow-2` +
|
||||
an accent-tinted border, and the logo tile's icon "pops" (§7);
|
||||
keyboard focus anywhere in the card outlines the **whole card**
|
||||
(`:has(:focus-visible)`); filtered-out = `hidden` attr (A3).
|
||||
- **`content-visibility: auto`** with `contain-intrinsic-size: auto 15rem`:
|
||||
with 326 cards on `/apps`, the browser skips layout and paint for the ones
|
||||
off screen while the scrollbar stays honest.
|
||||
|
||||
## 7. Motion
|
||||
|
||||
Durations 150 ms (hover/focus) · 250 ms (sheet, dialog, view transitions);
|
||||
easing `cubic-bezier(.2,.8,.2,1)`. Grid entrance: stagger opacity+4 px rise,
|
||||
30 ms apart, **first 12 cards only**. View Transitions: a cross-page fade.
|
||||
`@media (prefers-reduced-motion: reduce)` — all of the above collapse to
|
||||
instant; ClientRouter falls back to plain navigation.
|
||||
Tokens: `--duration-fast` 150 ms (hover/focus colour, borders) ·
|
||||
`--duration-slow` 250 ms (lift, icon motion); easing `--ease-sh`
|
||||
`cubic-bezier(.2,.8,.2,1)`, plus `--ease-spring` `cubic-bezier(.34,1.56,.64,1)`
|
||||
for pops. Motion is **opt-in per element**, through classes in
|
||||
`global.css`:
|
||||
|
||||
| Class | Effect | Used for |
|
||||
|---|---|---|
|
||||
| `sh-anim` | marks the control an icon reacts to (hover, or keyboard focus) | links, buttons, cards |
|
||||
| `sh-nudge-x` | icon slides 3 px right | "go there" arrows |
|
||||
| `sh-nudge-diag` | icon moves 2 px up-right | ↗ links that leave the site |
|
||||
| `sh-pop` | icon scales 1.12 and tilts −6°, spring easing | tiles, the anchor mark |
|
||||
| `sh-draw` | strokes redraw (dash-offset, 0.8 s), hover only | decorative icons |
|
||||
| `sh-rise` | fade + 12 px rise on first paint (0.6 s) | hero panels |
|
||||
| `sh-stagger` | children rise 45 ms apart, capped at 495 ms from the 12th | hero, category grids, contact cards |
|
||||
|
||||
`ShIcon` takes the effect as a prop (`motion="nudge-x" | "nudge-diag" |
|
||||
"pop" | "draw"`); hover variants sit behind `@media (hover: hover)`, focus
|
||||
variants do not. Delays are classes, never inline styles (CSP). Cards have
|
||||
**no** entrance animation — the grid reorders by moving nodes (docs/05
|
||||
§A3).
|
||||
|
||||
**View Transitions:** a native cross-document fade (docs/02 §6), opted in
|
||||
only under `prefers-reduced-motion: no-preference`; browsers without
|
||||
support simply navigate.
|
||||
|
||||
**Reduced motion collapses everything to instant**, whether the OS asks
|
||||
(`prefers-reduced-motion: reduce`) or the visitor picks Motion → Reduce in
|
||||
the display menu (`html[data-motion="reduce"]`, applied pre-paint): animation
|
||||
and transition durations go to 0.01 ms, **delays to 0** (a staggered element
|
||||
would otherwise sit invisible for its delay under fill mode `both`),
|
||||
iteration counts to 1, smooth scrolling off, and the view-transition
|
||||
pseudo-elements lose their animation.
|
||||
|
||||
**The card→detail morph is withdrawn (2026-07-30) — it is not implementable
|
||||
under this CSP.** `transition:name` makes Astro emit a per-slug `<style>`, and
|
||||
Astro does not put that style's hash into the page's own CSP, so the browser
|
||||
refuses it on hard loads and on swaps alike. Allow-listing all 326 hashes
|
||||
would add ~17 KB to every page head (~12 MB across the build) for a 180 ms
|
||||
effect, and a nonce needs a Worker (hard rule 1). It had never animated in any
|
||||
case: a morph needs the same `view-transition-name` on both sides, and the
|
||||
card never carried one. Revisit only if Astro starts hashing transition
|
||||
styles. The fade is unaffected — that style *is* hashed correctly.
|
||||
refused it on every load. Allow-listing all 326 hashes would add ~17 KB to
|
||||
every page head (~12 MB across the build) for a 180 ms effect, and a nonce
|
||||
would mean running every page through a Worker, which D25 explicitly rules
|
||||
out. It had never animated in any case: a morph needs the same
|
||||
`view-transition-name` on both sides, and the card never carried one.
|
||||
Revisit only if Astro starts hashing transition styles. The cross-document
|
||||
fade is unaffected — its one inline style is hashed by `astro.config.ts`.
|
||||
|
||||
## 8. Responsive
|
||||
|
||||
| Breakpoint | Grid cols | Notes |
|
||||
|---|---|---|
|
||||
| < 640 | 1 | filter = bottom sheet; sticky compact header; search full-width |
|
||||
| ≥ 640 | 2 | |
|
||||
| ≥ 1024 | 3 | filter = side panel |
|
||||
| ≥ 1440 | 4 | max content width 1360 px |
|
||||
| < 640 | 1 | filter sheet, legal gate = bottom sheets; mobile type step; wordmark hidden (mark only); search full-width; footer 2 columns |
|
||||
| ≥ 640 (`sm`) | 2 | filter = right-side panel |
|
||||
| ≥ 768 (`md`) | 2 | page gutter 24 px; footer 5 columns |
|
||||
| ≥ 1024 (`lg`) | 3 | header search hint appears; detail facts + status side by side |
|
||||
| ≥ 1280 (`xl`) | 4 | max content width 1360 px |
|
||||
|
||||
Touch targets ≥ 44×44 px; hover effects gated behind `@media (hover:hover)`.
|
||||
Touch targets ≥ 44×44 px (`.sh-btn`, gate button and filter rows have
|
||||
`min-height: 44px`); hover effects gated behind `@media (hover:hover)`.
|
||||
**Nothing may widen the layout viewport on a phone**: single-column grids
|
||||
are `minmax(0, 1fr)` and the hero contours stay inside their section — a
|
||||
long developer name or the decoration once widened phones to 459–620 px.
|
||||
The e2e suite fails any page whose document overflows sideways (docs/11
|
||||
§5).
|
||||
|
||||
## 9. Accessibility checklist
|
||||
|
||||
- Contrast ≥ 4.5:1 body, ≥ 3:1 large text & UI — verify both themes with
|
||||
the token table above (adjust L values, keep hues).
|
||||
- Keyboard: `/` focuses search (suppressed inside inputs, **and while the
|
||||
legal gate is open** — a global shortcut that reaches through a modal
|
||||
defeats the focus trap and can scroll content the user hasn't accepted yet)
|
||||
· Esc clears then blurs · Tab order header → toolbar → cards → footer ·
|
||||
sheet & gate use native `<dialog>` (focus trap, `aria-modal`, Esc — gate
|
||||
intercepts Esc, docs/14 §2).
|
||||
- `aria-live="polite"` result count; icons decorative (`aria-hidden`) with
|
||||
text alternatives; `lang` attribute correct per locale, including
|
||||
`lang="vi"` snippets embedded in EN pages.
|
||||
- Zoom to 200 % without horizontal scroll; test VoiceOver + NVDA on the grid
|
||||
and the gate before launch (docs/13 §2).
|
||||
- Contrast ≥ 4.5:1 text, ≥ 3:1 control boundaries — **enforced** for every
|
||||
token pair in both themes by `src/styles/contrast.test.ts` (§2; adjust L
|
||||
values, keep hues), and checked on rendered pages by axe in the e2e suite
|
||||
(light and dark, serious/critical findings fail — docs/11 §5).
|
||||
- Keyboard: `/` jumps to search from **any** page — on `/apps` `ShSearch`
|
||||
focuses its box, elsewhere `ShPrefs` navigates to `/apps#search`.
|
||||
Suppressed inside text fields, with modifier keys, **and while the legal
|
||||
gate is open** (`body[data-sh-gate="open"]`) — a global shortcut that
|
||||
reaches through a modal defeats the focus trap and can scroll content the
|
||||
user hasn't accepted yet. Esc in search clears, then blurs. A skip link
|
||||
("Skip to content") comes first; `scroll-padding-top` keeps focused or
|
||||
anchored content out from under the sticky header (WCAG 2.4.11). Tab order
|
||||
header → toolbar → cards → footer, and the grid's DOM order always equals
|
||||
its visual order (docs/05 §A3).
|
||||
- Overlays use the platform: the filter sheet and the legal gate are native
|
||||
`<dialog>`s opened with `showModal()` (focus trap, inert background);
|
||||
the gate also sets `closedby="none"` and re-opens if Esc or the browser
|
||||
closes it early (docs/14 Part 2). The gate focuses its heading first, so a
|
||||
screen reader reads the notice before any control. The display menu is a
|
||||
`popover`.
|
||||
- `aria-live="polite"` result count; `aria-current` on the current nav
|
||||
section (with an underline, not colour alone); icons decorative
|
||||
(`aria-hidden`) unless they are a control's only name; status shown by
|
||||
icon shape *and* colour; links in running text (legal prose, the gate)
|
||||
are underlined (WCAG 1.4.1).
|
||||
- Visible text stays inside the accessible name (WCAG 2.5.3): the language
|
||||
switch reads "EN — English" / "VI — Tiếng Việt" (the endonym appended in
|
||||
a matching `lang`, never replacing "EN"/"VI"), and the filter sheet's
|
||||
submit button is named by its own "Show N apps" text.
|
||||
- `lang` attribute correct per locale, including the `lang="vi"` panel on
|
||||
bilingual error pages and the VI suggestion banner on EN pages.
|
||||
- Zoom to 200 % without horizontal scroll (the e2e suite fails any sideways
|
||||
overflow at desktop and Pixel 7 sizes); VoiceOver + NVDA on the grid, the
|
||||
filter sheet and the gate remain a manual launch-checklist item (docs/13
|
||||
§2).
|
||||
+85
-28
@@ -12,9 +12,14 @@ Three i18n layers:
|
||||
|
||||
| Layer | Lives in | Examples |
|
||||
|---|---|---|
|
||||
| UI strings | `src/i18n/en.json`, `vi.json` | buttons, badges, security-line copy, error pages |
|
||||
| UI strings | `src/i18n/en.json`, `vi.json` (163 keys each, 2026-10-21) | buttons, badges, security-line copy, gate copy, error pages |
|
||||
| Content data | each app file (`summary.en/.vi`), category registry (`label.en/.vi`) | app summaries, category names |
|
||||
| Legal | full pages per locale (docs/14) | Disclaimer, Privacy, Terms… |
|
||||
| Legal | `src/components/legal/*.astro`, EN and VI in one file per document (docs/14 Part 3) | Disclaimer, Privacy, Terms… |
|
||||
|
||||
Error, 404 and offline pages are the exception to "one page per locale":
|
||||
each is **one bilingual document** (an EN and a `lang="vi"` panel), because
|
||||
an error can be reached from either locale — and `/offline` with no network
|
||||
at all — so there is no safe moment to pick one (docs/06 §5).
|
||||
|
||||
## 2. Routing
|
||||
|
||||
@@ -25,21 +30,25 @@ Astro built-in i18n (config in docs/02 §4): `defaultLocale: 'en'`,
|
||||
- VI pages are real files under `src/pages/vi/**` re-exporting shared page
|
||||
components with `locale="vi"` — thin wrappers, logic lives once.
|
||||
- **`getStaticPaths` is shared, never copy-pasted.** Astro requires it in each
|
||||
dynamic route file, and there are two per collection (EN + VI). Define the
|
||||
path builders once in `src/lib/paths.ts` and re-export:
|
||||
dynamic route file, and there are two per collection (EN + VI). The path
|
||||
builders are defined once in `src/lib/paths.ts` — one factory per
|
||||
collection, instantiated per locale — and re-exported:
|
||||
|
||||
```ts
|
||||
// src/pages/vi/apps/[slug].astro — and identically in src/pages/apps/[slug].astro
|
||||
export { appPaths as getStaticPaths } from '~/lib/paths';
|
||||
// src/pages/vi/apps/[slug].astro — the EN twin re-exports appPathsEn
|
||||
export { appPathsVi as getStaticPaths } from '../../../lib/paths';
|
||||
```
|
||||
|
||||
Duplicating the logic means a filter added to one locale silently skips the
|
||||
other, which breaks the parity guarantee CI cannot check (docs/10 §7).
|
||||
- **No automatic locale redirect.** Bots and users always get the URL they
|
||||
asked for. Instead: a one-time dismissible banner ("Trang này có bản
|
||||
tiếng Việt — Chuyển sang tiếng Việt?") renders when
|
||||
`navigator.language.startsWith('vi')` ∧ current locale is EN ∧
|
||||
`sh:lang` unset. Dismiss or switch sets `sh:lang`; banner never returns.
|
||||
asked for. Instead: a one-time dismissible banner — "Trang này có bản
|
||||
tiếng Việt." with [Chuyển sang tiếng Việt] [Giữ tiếng Anh], always in
|
||||
Vietnamese (`t('vi', …)`) because it only ever shows to a Vietnamese
|
||||
browser — renders when `navigator.language` starts with `vi` ∧ current
|
||||
locale is EN ∧ `sh:lang` unset. Switching writes the chosen locale;
|
||||
dismissing writes `en`; either way the banner never returns. `sh:lang`
|
||||
does nothing else — it never redirects (`src/lib/lang.ts`).
|
||||
|
||||
## 3. Dictionaries & typed helper
|
||||
|
||||
@@ -64,7 +73,7 @@ Flat dot-keys, alphabetized, identical key sets:
|
||||
// src/i18n/index.ts
|
||||
import en from './en.json';
|
||||
import vi from './vi.json';
|
||||
export type Locale = 'en' | 'vi';
|
||||
import { type Locale } from '../lib/locale'; // routing lives there
|
||||
export type Key = keyof typeof en; // en is the source of truth
|
||||
const dict: Record<Locale, Record<Key, string>> = { en, vi };
|
||||
|
||||
@@ -74,14 +83,37 @@ export function t(locale: Locale, key: Key,
|
||||
for (const [k, v] of Object.entries(vars)) s = s.replaceAll(`{${k}}`, String(v));
|
||||
return s;
|
||||
}
|
||||
|
||||
/** "1 app" / "326 apps" / "326 ứng dụng" — plural rule + digit grouping. */
|
||||
export function appCount(locale: Locale, n: number): string {
|
||||
const lang = locale === 'vi' ? 'vi-VN' : 'en-GB';
|
||||
const one = new Intl.PluralRules(lang).select(n) === 'one';
|
||||
return t(locale, one ? 'apps.count.one' : 'apps.count',
|
||||
{ n: new Intl.NumberFormat(lang).format(n) });
|
||||
}
|
||||
```
|
||||
|
||||
`appCount()` is the one way a count reaches a page, so no page can print
|
||||
"1 apps". Islands never import the dictionaries (that would bundle every
|
||||
key): they receive their strings as props, and where they must pluralise on
|
||||
the client — the grid count, the filter sheet's "Show N apps" — the server
|
||||
leaves one template per plural category and the island picks with
|
||||
`Intl.PluralRules(<html lang>)` (docs/05 §A3). Routing helpers
|
||||
(`localePath`, `localePair`, `canonicalPath`) live in `src/lib/locale.ts`,
|
||||
which imports no dictionary, so islands can use them for free;
|
||||
`src/i18n/index.ts` re-exports them.
|
||||
|
||||
**CI parity check** — its own script, `scripts/check-i18n-parity.mjs`, run by
|
||||
`pnpm i18n:check`. It is deliberately **not** folded into `validate-data.mjs`:
|
||||
that script is triggered by `src/data/**`, so an edit touching only
|
||||
`src/i18n/*.json` would skip the check entirely. Port it from
|
||||
`pnpm i18n:check` (and as the second step of `pnpm build`). It is
|
||||
deliberately **not** folded into `validate-data.mjs`: that script is
|
||||
triggered by `src/data/**`, so an edit touching only `src/i18n/*.json`
|
||||
would skip the check entirely. Ported from
|
||||
`E:\qoute\scripts\check-i18n-parity.ts` (flatten → bidirectional key diff →
|
||||
error list → non-zero exit).
|
||||
error list → non-zero exit), and since extended: an empty object counts as
|
||||
a key, **`{placeholder}` sets must match** between locales (a dropped one
|
||||
would render literal braces), **keys must be in alphabetical order** in
|
||||
every dictionary, and a UTF-8 BOM is stripped instead of crashing
|
||||
`JSON.parse`.
|
||||
|
||||
`vi.json` must contain **exactly** the keys of `en.json` — missing *or* extra
|
||||
keys fail the build (hard rule 6). No exceptions, including metadata or
|
||||
@@ -93,21 +125,43 @@ guard.
|
||||
- Every page reads `Astro.currentLocale`; components take `locale` as a
|
||||
prop — no global mutable locale.
|
||||
- Dates: `new Intl.DateTimeFormat(locale === 'vi' ? 'vi-VN' : 'en-GB',
|
||||
{ dateStyle: 'medium' })` — `en-GB` chosen for unambiguous `15 Jul 2026`.
|
||||
- Numbers (counts): `Intl.NumberFormat` per locale.
|
||||
- Sorting app names: `localeCompare` on `normalizeViet(name)` — identical
|
||||
order in both locales, avoiding collation surprises.
|
||||
- `<html lang>` = `en` / `vi`; embedded other-language strings (e.g. VI
|
||||
summary shown on an EN admin view — not in v1) must carry `lang`.
|
||||
{ dateStyle: 'medium', timeZone: 'UTC' })` — `en-GB` chosen for
|
||||
unambiguous `15 Jul 2026`; UTC so a `YYYY-MM-DD` never shifts a day.
|
||||
- Numbers (counts): `Intl.NumberFormat` per locale; plurals via
|
||||
`appCount()` (§3) or the per-plural templates islands use.
|
||||
- Sorting app names: `compareNames()` — `Intl.Collator('en', { sensitivity:
|
||||
'base', numeric: true })` over `normalizeViet(name)` — identical order in
|
||||
both locales, and independent of the visitor's browser locale and the
|
||||
build machine's ICU default (docs/05 §A3). A bare `localeCompare()` let a
|
||||
Czech-locale browser reorder 81 of 326 cards.
|
||||
- Category chips, filter labels and error copy are localized too; only the
|
||||
language switch's endonyms and the VI suggestion banner are deliberately
|
||||
fixed-language.
|
||||
- `<html lang>` = `en` / `vi`; embedded other-language strings carry `lang`
|
||||
— the VI panel on bilingual error pages, the VI suggestion banner on EN
|
||||
pages, the endonyms in the switcher.
|
||||
|
||||
## 5. Language switcher (`ShLangSwitch`)
|
||||
|
||||
Text toggle `EN | VI` in the header. Behavior: compute the counterpart URL
|
||||
of the *current* path (add/strip `/vi` prefix), navigate, persist choice to
|
||||
`sh:lang`. On pages without a counterpart (none by design — parity is
|
||||
total), fall back to the locale home. Also renders `<link rel="alternate">`
|
||||
awareness: switcher href must equal the hreflang alternate for the page
|
||||
(single source: a `localePair(path)` util used by both).
|
||||
A segmented `EN | VI` control in the header (`client:idle`). The current
|
||||
language is a `<span aria-current="true">` (the filled segment), the other
|
||||
a link with `hreflang` and `lang`. Accessible names keep the visible code
|
||||
and append the endonym, each inside an element with the matching `lang`:
|
||||
**"EN — English"** and **"VI — Tiếng Việt"** — never an `aria-label` that
|
||||
replaces "EN"/"VI", so voice-control users can say what they see (WCAG
|
||||
2.5.3).
|
||||
|
||||
Behavior: the counterpart URL is **server-rendered** from the same
|
||||
`localePair(path)` result `Base.astro` writes into the hreflang alternates,
|
||||
so the switcher href always equals the hreflang alternate (before v1.1 the
|
||||
island guessed until it hydrated, and every VI page shipped HTML marking
|
||||
English as current). On mount it appends `location.search` +
|
||||
`location.hash`, so a filtered `/apps?…` view survives a switch (docs/05
|
||||
§A3). Clicking persists the choice to `sh:lang` and is an ordinary full
|
||||
navigation — there is no `<ClientRouter />` (docs/02 §6). Every page has a
|
||||
counterpart except the single bilingual error/offline pages, which emit no
|
||||
alternates (`alternates={false}`); there the switcher leads to the other
|
||||
locale's home.
|
||||
|
||||
## 6. SEO
|
||||
|
||||
@@ -121,7 +175,10 @@ Every page emits:
|
||||
|
||||
`@astrojs/sitemap` i18n option (docs/02 §4) mirrors the same pairs into the
|
||||
sitemap. Canonical = self per locale (no cross-locale canonicals). Meta
|
||||
description = the locale's `summary`.
|
||||
description = the locale's `summary` on app pages, a per-page dictionary
|
||||
string elsewhere (docs/16 §7). Error and offline pages emit **no**
|
||||
alternates: advertising them pointed crawlers at `/vi/404` and
|
||||
`/vi/offline`, which do not exist.
|
||||
|
||||
**Never pass `Astro.url.pathname` straight into a canonical or an alternate.**
|
||||
With `build.format: 'file'` — which the trailing-slash fix requires (docs/02
|
||||
|
||||
+225
-70
@@ -1,7 +1,8 @@
|
||||
# 08 — Platform: Cloudflare Workers (setup · errors · offline)
|
||||
|
||||
> This is the operator's guide Kokone asked for. Part A is the click-by-click
|
||||
> setup; Part C answers "can Cloudflare make our error pages?" definitively.
|
||||
> setup; Part C answers "can Cloudflare make our error pages?" definitively;
|
||||
> Part E is the one Worker the site runs since v1.1 (D25).
|
||||
|
||||
## Part A — Setup guide (account + zone + first deploy)
|
||||
|
||||
@@ -9,66 +10,105 @@
|
||||
|
||||
1. Log in to the Cloudflare dashboard → **Workers & Pages**.
|
||||
2. If the account has no `workers.dev` subdomain yet, set it once
|
||||
(Workers & Pages → account **Subdomain**). Since v1.1 it only shapes
|
||||
**PR preview URLs** (`<version>-softharbor.<subdomain>.workers.dev`) —
|
||||
production lives on `softharbor.net`.
|
||||
(Workers & Pages → account **Subdomain**). Since the domain arrived
|
||||
(2026-07-20) it only shapes **PR preview URLs**
|
||||
(`<version>-softharbor.<subdomain>.workers.dev`) — production lives on
|
||||
`softharbor.net`.
|
||||
3. Copy the **Account ID** (right sidebar of the Workers overview).
|
||||
4. Onboard the `softharbor.net` zone — Free plan, nameservers, DNSSEC —
|
||||
per **docs/16 §2** (action item H2). The zone must exist before the
|
||||
first deploy, because `wrangler.jsonc` declares the custom-domain route.
|
||||
custom domains can be attached (docs/16 §3).
|
||||
|
||||
### A2. API token (for CI)
|
||||
### A2. API token (for CI) — retired
|
||||
|
||||
Dashboard → My Profile → **API Tokens** → Create Token → template
|
||||
**"Edit Cloudflare Workers"** → scope it to *this account only* → create,
|
||||
copy once. Then in GitHub repo → Settings → Secrets and variables →
|
||||
Actions:
|
||||
**Not used since 2026-07-28** (docs/12 §1). Deployment is Cloudflare Workers
|
||||
Builds (A4), which deploys with account-level credentials; no workflow in
|
||||
this repository deploys. The old `CLOUDFLARE_API_TOKEN` /
|
||||
`CLOUDFLARE_ACCOUNT_ID` repository secrets are unused and should be deleted
|
||||
(docs/15 §5). If a workflow ever needs a token again, it must carry zone
|
||||
scopes (**Zone → Workers Routes → Edit**, **Zone → DNS → Edit**) as well as
|
||||
Workers ones, and must never be committed or put in `wrangler.jsonc`.
|
||||
|
||||
| Secret | Value |
|
||||
|---|---|
|
||||
| `CLOUDFLARE_API_TOKEN` | the token above |
|
||||
| `CLOUDFLARE_ACCOUNT_ID` | account id from A1.3 |
|
||||
|
||||
Never put the token in `wrangler.jsonc` or commit it anywhere.
|
||||
|
||||
### A3. Local first deploy (sanity check before CI exists)
|
||||
### A3. Local deploy (bootstrap and emergencies only)
|
||||
|
||||
```bash
|
||||
pnpm build # → dist/
|
||||
pnpm install
|
||||
pnpm dlx wrangler@4 login # one-time browser OAuth (local only)
|
||||
pnpm dlx wrangler@4 deploy # reads wrangler.jsonc (docs/02 §7)
|
||||
pnpm deploy # = pnpm run build && wrangler deploy
|
||||
```
|
||||
|
||||
The `routes` block in `wrangler.jsonc` (docs/02 §7) makes this deploy also
|
||||
attach `softharbor.net` to the Worker: the apex DNS record and certificate
|
||||
are provisioned automatically. Verify: `https://softharbor.net/` renders,
|
||||
This uploads `dist/` **and** the Worker (`main`, docs/02 §7). Since commit
|
||||
66c6255 (2026-07-28) `wrangler.jsonc` declares no `routes`:
|
||||
`softharbor.net` and `www.softharbor.net` are Custom Domains attached in
|
||||
the dashboard (Workers & Pages → softharbor → Domains), and a deploy leaves
|
||||
them untouched. Re-creating the Worker from a fresh clone therefore needs
|
||||
both domains re-attached by hand (docs/16 §3), plus the runtime secret
|
||||
(Part E).
|
||||
|
||||
**Never run `wrangler deploy` by hand while Workers Builds builds are
|
||||
queued** (A4): a queued *older* build would land after yours and roll
|
||||
production back. A local deploy also bypasses `ci`. Prefer merging.
|
||||
|
||||
Verify after any deploy: `https://softharbor.net/` renders,
|
||||
`/apps/does-not-exist` returns **HTTP 404** with our page (not a blank
|
||||
Cloudflare 404), `/_headers` rules apply (`curl -I` shows CSP — docs/09
|
||||
§4), and the old `softharbor.<subdomain>.workers.dev` no longer serves
|
||||
(`workers_dev: false`). Full domain checklist: docs/16 §10.
|
||||
Cloudflare 404), `_headers` rules apply (`curl -I` shows `frame-ancestors`
|
||||
— docs/09 §4), and the old `softharbor.<subdomain>.workers.dev` no longer
|
||||
serves (`workers_dev: false`). Full domain checklist: docs/16 §10.
|
||||
|
||||
### A4. Continuous deploys & previews
|
||||
### A4. Continuous deploys & previews (Workers Builds)
|
||||
|
||||
- Production: `deploy.yml` runs `cloudflare/wrangler-action` on every push
|
||||
to `main` (docs/12 §3).
|
||||
- PR previews: `wrangler versions upload` produces a per-version preview
|
||||
URL (enabled by `"preview_urls": true`); the workflow comments it on the
|
||||
PR. Previews also run the legal gate — expected.
|
||||
- **Production:** Cloudflare **Workers Builds** — the dashboard's git
|
||||
integration, not a GitHub workflow (docs/12 §3) — builds every push to
|
||||
`main` with `pnpm run build` and deploys with `npx wrangler deploy`.
|
||||
- **PR previews:** the same integration builds each PR push and uploads a
|
||||
version with `wrangler versions upload`, producing a per-version preview
|
||||
URL (enabled by `"preview_urls": true`) that it reports on the PR.
|
||||
Previews run the legal gate — expected — and carry `X-Robots-Tag:
|
||||
noindex` from `_headers` (docs/16 §3).
|
||||
- **Builds run one at a time.** After a burst of PR pushes, a `main` merge
|
||||
can wait about **20 minutes** before its build starts, and a superseded
|
||||
queued build of `main` may be skipped (observed 2026-10-21: `ff95578`
|
||||
never deployed, `3743cfb` did). The **"Workers Builds" check run appears
|
||||
on a `main` commit only once its build starts** — its absence right after
|
||||
a merge means "queued", not "broken". A gap in `wrangler deployments
|
||||
list` means no commit reached `main`, nothing more.
|
||||
- **Release step — verify production after every merge** (docs/13 §3):
|
||||
1. wait until the merge commit's "Workers Builds" check is green;
|
||||
2. then check production itself: the new content-hashed `/_astro/` asset
|
||||
names are served, the headers (`curl -I`), the per-page CSP meta,
|
||||
`POST /api/verify` (Part E), and `/rss.xml`;
|
||||
3. never "help" with a manual `wrangler deploy` while builds are queued
|
||||
(A3).
|
||||
- The **build environment is Cloudflare's**: it must match `.nvmrc`
|
||||
(Node 26 since 2026-10-23; the image preinstalls only 22 and 24, so 26 is
|
||||
downloaded per build) and `packageManager` (pnpm 11), or production can
|
||||
differ from what CI validated — re-check after any toolchain bump
|
||||
(docs/13 §2). Node 25+ ships no Corepack; should a build ever fail to find
|
||||
pnpm, the Workers Builds variable `PNPM_VERSION=11.15.1` is the fix.
|
||||
- Rollback: dashboard → the Worker → **Deployments** → promote a previous
|
||||
version, or `wrangler rollback`.
|
||||
|
||||
### A5. Observability & limits
|
||||
|
||||
- Metrics: Worker → **Metrics** shows request counts/status classes. There
|
||||
is no `wrangler tail` stream for pure static assets (no script runs) —
|
||||
client-side errors reach us via the bug-report flow instead (docs/05 §A5–A6).
|
||||
- **Billing:** with no `main` script and `run_worker_first` unset, every
|
||||
request is served from static assets and is **not billed** — the site
|
||||
costs $0 in usage on the existing Workers Paid plan.
|
||||
- Metrics: Worker → **Metrics** shows request counts and status classes.
|
||||
Static-asset requests run no code, so there is nothing to `tail` for them
|
||||
— client-side errors reach us via the bug-report flow instead (docs/05
|
||||
§A5–A6).
|
||||
- **Workers Logs** (`observability.enabled`, invocation logs **off**) hold
|
||||
only the Worker's own one-line JSON events: `{event: "verify", outcome,
|
||||
ms}` per request, `verify.secret_refused` when Siteverify rejects our
|
||||
secret, `verify.crash` on an unexpected exception — never an IP address
|
||||
or a token (Part E). `wrangler tail` shows the same lines live.
|
||||
- **Billing:** only requests that run the Worker are billed Worker
|
||||
requests — `run_worker_first` paths (`/api/verify`) and the rare
|
||||
non-navigation request that matches no asset (Part C). Pages, assets and
|
||||
feeds are served by the asset server and are **not billed**.
|
||||
- Asset limits to respect (check current values in CF docs at setup time;
|
||||
documented limits as of writing): max ~20 000 files per deploy, 25 MiB
|
||||
per file. SoftHarbor's budget: < 1 000 files, largest file < 1 MiB —
|
||||
comfortable margins. `validate-data.mjs` warns at 15 000 files.
|
||||
per file. SoftHarbor's footprint (local build, 2026-10-21): 763 files in
|
||||
`dist/`, 701 of them HTML; the largest is `/vi/apps` at ~1.3 MB raw
|
||||
(~125 KB gzip — every card is server-rendered, docs/15 §2 item 9).
|
||||
Comfortable margins; nothing checks this automatically.
|
||||
|
||||
## Part B — What we deliberately do NOT configure in v1
|
||||
|
||||
@@ -77,52 +117,87 @@ no Bot Fight Mode, no Custom Errors** — each has a reason and a ready-made
|
||||
activation recipe in **docs/16 §9** (short version: static assets are
|
||||
unbilled so there's nothing to protect, bot challenges would break our own
|
||||
`/api/apps.json` + RSS consumers, and Custom Errors is a paid-zone
|
||||
feature). HSTS **is** configured — zone-level, phased (docs/16 §5). Do not
|
||||
"pre-enable" anything beyond that.
|
||||
feature). HSTS **is** configured — zone-level, now at phase P3 (docs/16
|
||||
§5). Do not "pre-enable" anything beyond that.
|
||||
|
||||
Two things that look similar but are not zone features: the Worker's
|
||||
**Workers Rate Limiting binding** (`VERIFY_LIMITER`, Part E) guards only
|
||||
`/api/verify`, and **Turnstile** (D25) is a widget our own page loads after
|
||||
consent — neither touches how pages are served. Conversely, the zone's
|
||||
**Speed Brain** speculative prefetch should be **off**: Cloudflare refuses
|
||||
prefetch on Worker requests with a 503, which is why `astro.config.ts` sets
|
||||
`prefetch: false` (docs/16 §9 — ⚠ verify the zone setting; production still
|
||||
sent a `Speculation-Rules` header on 2026-10-21).
|
||||
|
||||
## Part C — Error-page matrix (the definitive answer)
|
||||
|
||||
Background (re-verified 2026-07-20): Cloudflare **Custom Errors** is a
|
||||
**paid zone-plan** feature — our zone is Free (docs/16 §1/N4) — and even
|
||||
where available it does not apply to 500/501/503/505 responses. Therefore
|
||||
in v1 **every error page a user can see must come from our own build
|
||||
output**, and anything Cloudflare itself emits shows Cloudflare's default
|
||||
page:
|
||||
**every error page a user can see must come from our own build output**,
|
||||
and anything Cloudflare itself emits shows Cloudflare's default page. The
|
||||
v1.1 Worker (Part E) changes nothing for pages: its error statuses are JSON
|
||||
answers to the gate's own `fetch`, never a document.
|
||||
|
||||
| Status | Who generates it in v1 | What the user sees | Our artifact |
|
||||
| Status | Who generates it | What the user sees | Our artifact |
|
||||
|---|---|---|---|
|
||||
| 404 | Static assets router (URL matches nothing) | Our branded page, real HTTP 404 | `dist/404.html` via `not_found_handling: "404-page"` |
|
||||
| 500-class | Practically cannot originate from us (no script). Cloudflare infra errors (52x) show Cloudflare's page — not customizable on a Free zone | CF default (rare) | `/errors/500` template kept **dormant** |
|
||||
| 403 | Nothing issues 403 in v1 — WAF features deliberately OFF (docs/16 §9). If ever enabled on the Free zone, blocks render **Cloudflare's default page** (custom responses are paid features) | n/a | `/errors/403` dormant template |
|
||||
| 429 | Nothing issues 429 in v1 — rate limiting deliberately OFF (docs/16 §9); same Free-zone caveat as 403 | n/a | `/errors/429` dormant template |
|
||||
| 404 (navigation) | Asset server, URL matches nothing. With `compatibility_date` ≥ 2025-04-01 a navigation miss gets `404.html` **without invoking the Worker** | Our branded, bilingual page, real HTTP 404, no legal gate | `dist/404.html` via `not_found_handling: "404-page"` |
|
||||
| 404 (other) | A non-navigation miss (an image, a JSON file) reaches the Worker, which returns `env.ASSETS.fetch(request)` — the same `not_found_handling` | Same 404 | same |
|
||||
| 500-class (pages) | Practically cannot originate from us — no code runs for a page. Cloudflare infra errors (52x) show Cloudflare's page — not customizable on a Free zone | CF default (rare) | `/errors/500` template kept **dormant** |
|
||||
| 403 (pages) | Nothing issues 403 for a page — WAF features deliberately OFF (docs/16 §9). If ever enabled on the Free zone, blocks render **Cloudflare's default page** (custom responses are paid features) | n/a | `/errors/403` dormant template |
|
||||
| 429 (pages) | Nothing issues 429 for a page — zone rate limiting deliberately OFF (docs/16 §9); same Free-zone caveat as 403 | n/a | `/errors/429` dormant template |
|
||||
| 4xx/5xx from `/api/verify` | The Worker: `400 invalid_json`/`invalid_token`, `403 bad_origin`/`rejected`, `405`, `413`, `415`, `429 rate_limited` (`Retry-After: 60`), `503 not_configured`/`unavailable`, `500 internal_error` | Nothing — the gate reads the status; 403 asks Turnstile for a fresh challenge, every other failure **fails open** (docs/05 §A9) | JSON body `{ "error": "<code>" }` |
|
||||
| No internet | Client-side | Our offline page | `offline.html` via service worker (Part D) |
|
||||
|
||||
The dormant templates cost three static pages and make a future Pro-zone
|
||||
Custom Errors switch-on a config-only task (docs/16 §9 recipe).
|
||||
Custom Errors switch-on a config-only task (docs/16 §9 recipe). Like
|
||||
`/404` and `/offline` they are gate-exempt, `noindex` and bilingual on one
|
||||
page (docs/06 §5).
|
||||
|
||||
## Part D — PWA / offline ("No Internet" page)
|
||||
|
||||
Scope: **offline fallback only** — not an installable app-cache of the whole
|
||||
site (a software directory is useless offline anyway; we just refuse to show
|
||||
a browser dinosaur).
|
||||
Scope: **an installable app with an offline fallback** — not an app-cache of
|
||||
the whole site (a software directory is useless offline anyway; we just
|
||||
refuse to show a browser dinosaur). Since v1.1 the manifest is linked and
|
||||
has proper icons, so the site is installable; navigation still always goes
|
||||
to the network.
|
||||
|
||||
```ts
|
||||
// astro.config.ts — AstroPWA(…)
|
||||
// astro.config.ts — AstroPWA(…) (abridged)
|
||||
AstroPWA({
|
||||
registerType: 'autoUpdate',
|
||||
// MUST be explicit: without it registerSW.js is emitted but referenced by
|
||||
// no page, and the SW silently never registers (S5). 'script', not
|
||||
// 'inline': an injected inline snippet would not be in the CSP hashes.
|
||||
injectRegister: 'script',
|
||||
manifest: {
|
||||
name: 'SoftHarbor', short_name: 'SoftHarbor',
|
||||
id: '/', name: 'SoftHarbor', short_name: 'SoftHarbor', lang: 'en',
|
||||
description: 'Free & buy-once desktop software, one page.',
|
||||
theme_color: '#f7f4ee', background_color: '#f7f4ee',
|
||||
icons: [/* 192, 512, maskable — public/icons/ */],
|
||||
// The icon tile's colour (scripts/gen-icons.mjs), so the install splash
|
||||
// and title bar match the icon rather than the page.
|
||||
theme_color: '#0B4F7A', background_color: '#0B4F7A',
|
||||
icons: [
|
||||
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' },
|
||||
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any' },
|
||||
{ src: '/icons/maskable-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
|
||||
{ src: '/favicon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' },
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
// '_astro/*.woff2', NOT 'fonts/*.woff2' — Astro hashes fonts into _astro/,
|
||||
// so the old glob matched nothing and the offline page would have rendered
|
||||
// unstyled (found in M1, 2026-07-27).
|
||||
// 'offline.html', NOT 'offline/**' — the glob is coupled to build.format
|
||||
// ('file'), so the directory pattern matched nothing (M1/S5).
|
||||
globPatterns: ['offline.html', '_astro/*.woff2', 'favicon.svg'], // shell only
|
||||
// What /offline needs, and nothing more. Coupled to build.format
|
||||
// ('offline.html', never 'offline/**') and to Astro hashing fonts and
|
||||
// CSS into _astro/ (never a /fonts/ dir) — both mistakes once matched
|
||||
// nothing, silently (M1, S5).
|
||||
globPatterns: [
|
||||
'offline.html',
|
||||
'_astro/*.css', // inlineStylesheets 'never'
|
||||
'_astro/{errors,theme,analytics}.*.js', // the head scripts
|
||||
'_astro/be-vietnam-pro-{latin,vietnamese}-400-normal.*.woff2',
|
||||
'_astro/bricolage-grotesque-{latin,vietnamese}-wght-normal.*.woff2',
|
||||
'favicon.svg',
|
||||
],
|
||||
skipWaiting: true, // registerSW.js never posts SKIP_WAITING
|
||||
clientsClaim: true, // control the page that installed the SW (S5)
|
||||
// MUST be the empty string, and must be present. Omitting the key does
|
||||
// NOT disable it: vite-plugin-pwa's `defaultWorkbox` sets
|
||||
// navigateFallback: 'index.html', which emitted
|
||||
@@ -147,15 +222,95 @@ AstroPWA({
|
||||
|
||||
Behavior: online navigation always hits the network (content freshness >
|
||||
offline cleverness); when a navigation fails, the precached `/offline` page
|
||||
renders. **`pnpm check:sw` asserts this against the emitted `dist/sw.js`** —
|
||||
no `NavigationRoute`, a `NetworkOnly` navigation handler, `/offline` and the
|
||||
fonts actually precached, and `registerSW.js` referenced by a page. Every one
|
||||
of the four service-worker bugs this project has had was silent at build time,
|
||||
so the config being right is not evidence that the output is. Spike S5 verifies: SW registers under the production origin
|
||||
renders — styled, with its scripts and the latin + Vietnamese body and
|
||||
display faces. The precache is deliberately small: until v1.1 the SW
|
||||
precached all 13 font files (211 KB) on a visitor's first page view, yet
|
||||
missed the CSS the offline page links (it rendered unstyled exactly when
|
||||
needed). Other faces fall back to system fonts offline. `Base.astro` links
|
||||
`/manifest.webmanifest` (the plugin emits it but links it from no page) and
|
||||
loads `/registerSW.js` with `defer`; icons come from `pnpm icons`
|
||||
(`scripts/gen-icons.mjs`, output committed to `public/`).
|
||||
|
||||
**`pnpm check:sw` asserts this against the emitted `dist/sw.js`** — no
|
||||
`NavigationRoute`, a `NetworkOnly` navigation handler with the `/offline`
|
||||
fallback, `offline.html` and fonts precached, **every stylesheet and
|
||||
`/_astro/` script `/offline` loads precached**, `skipWaiting()` present,
|
||||
and `registerSW.js` plus the manifest link referenced from `dist/index.html`.
|
||||
Every one of the service-worker bugs this project has had was silent at
|
||||
build time, so the config being right is not evidence that the output is.
|
||||
Spike S5 verifies: SW registers under the production origin
|
||||
(`softharbor.net` — a preview URL is acceptable for early iterations, but
|
||||
the final pass runs on the real origin), fallback fires in airplane mode,
|
||||
`autoUpdate` swaps SW without a stale lockout, and the legal gate behaves
|
||||
on the offline page (it is exempt — docs/14 §2).
|
||||
on the offline page (it is exempt — the page declares `gateExempt`, docs/14
|
||||
Part 2).
|
||||
|
||||
## Part E — The `/api/verify` Worker (D25)
|
||||
|
||||
The one piece of server code (CLAUDE.md hard rule 1 as amended). Threat
|
||||
model and the client half: docs/09 §4a, docs/05 §A9.
|
||||
|
||||
**Files.** `worker/index.ts` (entry: `/api/verify` → `handleVerify`,
|
||||
anything else → `env.ASSETS.fetch(request)`), `worker/verify.ts` (the
|
||||
endpoint), `worker/http.ts` (JSON responses, streamed body cap, rate-limit
|
||||
key), `worker/env.ts` (bindings, typed by hand — `@cloudflare/workers-types`
|
||||
would collide with the DOM lib the site compiles against). Tested by the
|
||||
Vitest `worker` project against a stubbed Siteverify (docs/11 §2); CI also
|
||||
runs `wrangler deploy --dry-run` so a config error fails before production.
|
||||
|
||||
**Routing.** `assets.run_worker_first: ["/api/verify"]` is the only path
|
||||
that runs the Worker before the asset server. Pages, assets and feeds never
|
||||
invoke it; a navigation that matches nothing gets `404.html` from the asset
|
||||
server (Part C).
|
||||
|
||||
**Contract — `POST /api/verify`**, body `{"token": "<turnstile token>"}`:
|
||||
|
||||
| Check | Refusal |
|
||||
|---|---|
|
||||
| method is POST | `405` + `Allow: POST` |
|
||||
| `Origin` equals the origin the request arrived on (works on previews and `wrangler dev` without a host list) | `403 bad_origin` |
|
||||
| `TURNSTILE_SECRET` present | `503 not_configured` |
|
||||
| rate limit — 20 per 60 s per IPv4 address or IPv6 /64 (`VERIFY_LIMITER`) | `429 rate_limited`, `Retry-After: 60` |
|
||||
| `Content-Type` exactly `application/json` (what a cross-site form or no-preflight fetch cannot send) | `415` |
|
||||
| body ≤ 4 KB — `Content-Length` checked, then counted **while streaming** | `413` |
|
||||
| valid JSON with a non-empty string `token` ≤ 2048 chars | `400 invalid_json` / `invalid_token` |
|
||||
| Siteverify says success, `hostname` = request host, `action` = `legal_gate`, `challenge_ts` ≤ 300 s old | `403 rejected` |
|
||||
| Siteverify cannot answer (network error or 5xx twice, a 4xx or non-JSON reply, `internal-error`) or refuses our secret | `503 unavailable` |
|
||||
|
||||
Success is `200 {"ok":true}`. Siteverify is called with the secret, the
|
||||
token, `remoteip` (the `CF-Connecting-IP`, never logged) and an
|
||||
**idempotency key**; a network error or 5xx is retried **once with the same
|
||||
key**, so the retry is answered instead of calling the token spent (4 s
|
||||
timeout per attempt). Cloudflare's documented test secrets (`1x…`, `2x…`,
|
||||
`3x…`) skip the hostname/action/age comparison, whose values they fake.
|
||||
|
||||
Every response is `no-store` JSON with its own security headers —
|
||||
`Content-Security-Policy: default-src 'none'; frame-ancestors 'none'`,
|
||||
`Cross-Origin-Resource-Policy: same-origin`, `Referrer-Policy`,
|
||||
`X-Content-Type-Options` — because `public/_headers` applies to asset
|
||||
responses only, never to what Worker code returns.
|
||||
|
||||
**Fail open, always.** The verdict only decides how long the gate remembers
|
||||
the visitor (48 h after a pass, 1 h otherwise — docs/05 §A9). It never
|
||||
blocks a page: no secret, a Siteverify outage, the rate limit, a blocked
|
||||
script — all let the person in.
|
||||
|
||||
**Secrets.** `TURNSTILE_SECRET` is a **runtime** secret: dashboard →
|
||||
Workers & Pages → softharbor → Settings → Variables and Secrets, or
|
||||
`wrangler secret put TURNSTILE_SECRET`. A Workers Builds *build* variable is
|
||||
invisible to the Worker at runtime. Missing → every check answers 503 and
|
||||
the gate fails open, so the site works but nobody is verified — check it
|
||||
after re-creating the Worker (docs/13 §2). Set in production: verified
|
||||
2026-10-21 — a junk token got `403 {"error":"rejected"}`, not
|
||||
`503 not_configured`. For `wrangler dev`, copy `.dev.vars.example` to
|
||||
`.dev.vars` (git-ignored): it holds Cloudflare's always-pass **test**
|
||||
secret, which pairs with the test sitekey the gate uses on localhost. The
|
||||
sitekey itself is public by design and lives in `src/lib/turnstile.ts`.
|
||||
|
||||
**Logs.** One line per request — `{event: "verify", outcome, ms}` — plus
|
||||
`verify.secret_refused` (our secret was rejected: ours to fix) and
|
||||
`verify.crash`. Never an IP address, never a token; invocation logs are off
|
||||
in `wrangler.jsonc`.
|
||||
|
||||
## Appendix — Future custom-domain package (superseded in v1.1)
|
||||
|
||||
|
||||
+267
-67
@@ -2,12 +2,15 @@
|
||||
|
||||
## 1. Posture in one paragraph
|
||||
|
||||
A static site with no accounts, no forms, no cookies, no third-party
|
||||
requests, and no server code has a small attack surface — the residual risks
|
||||
are **supply chain** (our build), **data integrity** (a malicious or sloppy
|
||||
listing), and **reputation** (recommending software that later turns out
|
||||
harmful). Sections below address exactly those three, plus the honest-privacy
|
||||
story.
|
||||
A static site with no accounts, no forms, no cookies and no page-serving
|
||||
server code has a small attack surface — the residual risks are **supply
|
||||
chain** (our build), **data integrity** (a malicious or sloppy listing), and
|
||||
**reputation** (recommending software that later turns out harmful).
|
||||
Since v1.1 two deliberate additions widen it slightly and are covered
|
||||
here: **one server endpoint**, `POST /api/verify` (D25, §4a), and **two
|
||||
disclosed Cloudflare services** loaded by our own code — Web Analytics
|
||||
(D26) and Turnstile (D25). Sections below address all of that, plus the
|
||||
honest-privacy story.
|
||||
|
||||
## 2. Threat model
|
||||
|
||||
@@ -15,19 +18,24 @@ story.
|
||||
|---|---|---|---|
|
||||
| T1 | Visitors' machines | A listed app is/becomes malware; user installs it trusting us | Inclusion criteria C5–C7; vetting checklist §6; dated `security.status` (never a guarantee — hard rule 4); quarantine pipeline (docs/03 §5); monthly re-verification (docs/13 §6); Disclaimer (docs/14 §3a) |
|
||||
| T2 | Visitors | Typosquat/mirror `links.download` sneaks into a PR | Official-domain rule (hard rule 8); L4 human review compares domain to vendor's known domain; lychee catches parked/dead domains; PRs from non-maintainers never auto-merge |
|
||||
| T3 | Site integrity | Supply-chain compromise of a dependency poisons the build | §7: lockfile, `ignore-scripts`, Renovate + osv-scanner, SHA-pinned actions, minimal dependency count |
|
||||
| T4 | Site integrity | XSS via data fields | All rendering through Astro's default escaping; **no `set:html` anywhere** (lint-banned); schema constrains URLs to https; CSP §4 as backstop |
|
||||
| T5 | Visitors | Clickjacking / framing on a look-alike site | `frame-ancestors 'none'` + `X-Frame-Options: DENY` |
|
||||
| T6 | Repo | Malicious PR alters workflows/scripts | Branch protection; CODEOWNERS on `.github/**`, `scripts/**`, `src/data/**`; workflows from forks get read-only token (GitHub default) |
|
||||
| T7 | Availability | DDoS | Cloudflare edge absorbs; static assets, nothing to exhaust; no further action in v1 |
|
||||
| T8 | Users' privacy | Tracking/leakage | No analytics, no third-party origins (CSP-enforced), localStorage-only prefs §8 |
|
||||
| T9 | The domain itself | `softharbor.net` hijack (registrar/DNS) or email spoofing "from" the domain | Registrar transfer lock + auto-renew, DNSSEC enabled, zone changes only via the two admin paths (dashboard, wrangler deploy); SPF + DMARC (`p=quarantine` → `reject`) — all in docs/16 §2/§6 |
|
||||
| T3 | Site integrity | Supply-chain compromise of a dependency poisons the build | §7: frozen lockfile, `allowBuilds` allowlist, Dependabot + osv-scanner + `pnpm audit`, SHA-pinned actions, CodeQL + SonarCloud, minimal dependency count |
|
||||
| T4 | Site integrity | XSS via data fields | All rendering through Astro's default escaping; `set:html` lint-banned (`astro/no-set-html-directive`) except five named files that inline build-time SVG, JSON-LD or one constant (docs/10 §3); JSON-LD escapes `<`; schema constrains URLs to https; CSP §4 as backstop |
|
||||
| T5 | Visitors | Clickjacking / framing on a look-alike site | `frame-ancestors 'none'` + `X-Frame-Options: DENY` (and on Worker responses, §4a) |
|
||||
| T6 | Repo | Malicious PR alters workflows/scripts/the Worker | Ruleset on `main`: PR required, **signed commits**, required checks (docs/12 §8); CODEOWNERS on `.github/**`, `scripts/**`, `src/data/**`, `worker/**`; every workflow declares least `permissions:` (the repo default token is read-write); `persist-credentials: false` on checkout; step outputs reach shell only via `env:` (no `${{ }}` in `run:`) |
|
||||
| T7 | Availability | DDoS | Cloudflare edge absorbs; static assets, nothing to exhaust. The one endpoint is rate-limited per IP or /64 and fails open, so exhausting it locks nobody out (§4a) |
|
||||
| T8 | Users' privacy | Tracking/leakage | No cookies, no ads, no fingerprinting by us. Two Cloudflare services only, both started by our code: Web Analytics (cookieless; never under Global Privacy Control or off the production host) and Turnstile (only after the documents are accepted). The CSP allows exactly their origins (§4); storage inventory §8 |
|
||||
| T9 | The domain itself | `softharbor.net` hijack (registrar/DNS) or email spoofing "from" the domain | Registrar transfer lock + auto-renew, DNSSEC enabled, zone changes only via the dashboard (custom domains are attached there, docs/16 §3); SPF + DMARC `p=quarantine` observed 2026-10-21 (→ `reject` planned) — docs/16 §2/§6 |
|
||||
| T10 | The endpoint | `/api/verify` abused: cross-site POSTs, replayed or foreign tokens, oversized bodies, burning the Siteverify allowance | Same-origin check; `application/json` only; body ≤ 4 KB counted while streaming; token ≤ 2048 chars; Siteverify verdict re-checked for host, `action: legal_gate` and age ≤ 300 s; idempotency key; Workers Rate Limiting 20/60 s per IPv4 or IPv6 /64; `no-store` — all in §4a |
|
||||
| T11 | Visitors | A compromised third-party script (the analytics beacon or Turnstile's `api.js`) | Loaded by our code only, from exactly two CSP-listed origins; analytics never on previews, localhost or under GPC; Turnstile only after acceptance and inside its own iframe. No Subresource Integrity — both are unversioned URLs Cloudflare updates in place — so this is an **accepted** dependency on Cloudflare, the host we already trust with every byte |
|
||||
|
||||
## 3. Non-existent surfaces (by design)
|
||||
|
||||
No auth, no sessions, no cookies, no server input parsing, no file uploads,
|
||||
no comments. Keep it that way: any feature that adds one of these requires a
|
||||
threat-model update in this file first.
|
||||
No auth, no sessions, no cookies, no file uploads, no comments, no
|
||||
database. **One** server input exists since v1.1: the JSON body of
|
||||
`POST /api/verify` — at most 4 KB, one string field, read only to be
|
||||
forwarded to Siteverify (§4a). Keep it that way: any feature that adds one
|
||||
of these — or a second server input — requires a threat-model update in
|
||||
this file first, and a decision-log entry (hard rule 1).
|
||||
|
||||
## 4. HTTP headers & CSP
|
||||
|
||||
@@ -42,19 +50,41 @@ threat-model update in this file first.
|
||||
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()
|
||||
Cross-Origin-Opener-Policy: same-origin
|
||||
Cross-Origin-Resource-Policy: same-origin
|
||||
Cache-Control: public, max-age=0, must-revalidate
|
||||
|
||||
/_astro/*
|
||||
! Cache-Control
|
||||
Cache-Control: public, max-age=31536000, immutable
|
||||
|
||||
/api/apps.json
|
||||
! Cache-Control
|
||||
Access-Control-Allow-Origin: *
|
||||
Cache-Control: public, max-age=300
|
||||
|
||||
/search-index.json
|
||||
! Cache-Control
|
||||
Cache-Control: public, max-age=300
|
||||
|
||||
# RFC 9116 §3: text/plain WITH charset=utf-8
|
||||
/.well-known/security.txt
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
# PR preview versions (docs/16 §3); never matches the custom domain
|
||||
https://:version.:subdomain.workers.dev/*
|
||||
X-Robots-Tag: noindex
|
||||
```
|
||||
|
||||
**`/*` sets no `Cache-Control`, and every specific rule detaches with
|
||||
`! Cache-Control` first** (fixed 2026-10-21). Cloudflare applies *every*
|
||||
matching rule and **joins** a header set by several of them with a comma —
|
||||
it does not override. With the old `/*` value, hashed assets were served
|
||||
`public, max-age=0, must-revalidate, public, max-age=31536000, immutable`;
|
||||
browsers honour the first `max-age` (RFC 9111 even says to treat
|
||||
conflicting directives as stale), so every "immutable" asset was
|
||||
revalidated on every load and the JSON feeds were never cached. HTML,
|
||||
`sw.js` and the manifest still get `public, max-age=0, must-revalidate` —
|
||||
Cloudflare's own default for static assets. `_headers` applies only to
|
||||
asset responses; the Worker sets its own headers (§4a).
|
||||
|
||||
**There is no `/fonts/*` rule.** Astro content-hashes the self-hosted fonts
|
||||
into `/_astro/` along with JS and CSS, so the `/fonts/*` rule earlier drafts
|
||||
carried matched nothing (verified in M1: `dist/` contains 13 `.woff2` files,
|
||||
@@ -66,7 +96,9 @@ Notes:
|
||||
- **The CSP is split between a header and a meta tag (decision D20,
|
||||
supersedes D18).** Settled empirically in spike S1, 2026-07-27:
|
||||
- `<ClientRouter />` compiles to an **external** module script — it was
|
||||
never the problem.
|
||||
never the problem. (It is gone anyway since v1.1: Astro does not
|
||||
support ClientRouter together with `security.csp`, and a soft
|
||||
navigation kept the *first* page's meta policy — docs/02 §6.)
|
||||
- **Astro's island hydration is.** Every `client:*` directive emits inline
|
||||
bootstrap scripts into that page's HTML. With six islands (docs/02 §5)
|
||||
that is effectively every page, so the D18 plan — "ship nothing inline,
|
||||
@@ -79,23 +111,58 @@ Notes:
|
||||
`script-src`/`style-src` plus our other directives. No hand-maintained
|
||||
hash list, no `emit-csp.mjs`, no placeholder to forget — which was B4's
|
||||
real complaint.
|
||||
- **The policy (v1.1)**, emitted on every page:
|
||||
`default-src 'self'; img-src 'self' data:; font-src 'self';
|
||||
connect-src 'self' https://cloudflareinsights.com;
|
||||
frame-src https://challenges.cloudflare.com; manifest-src 'self';
|
||||
base-uri 'none'; form-action 'none'; object-src 'none'`, plus
|
||||
`script-src 'self' https://static.cloudflareinsights.com
|
||||
https://challenges.cloudflare.com` + Astro's hashes, and
|
||||
`style-src 'self'` + hashes. The two Cloudflare origins are D26 (beacon
|
||||
script + beacon POST) and D25 (Turnstile `api.js` + its iframe) — nothing
|
||||
else third-party, and adding an origin needs a decision-log entry (hard
|
||||
rule 7). `scriptDirective.resources` **replaces** Astro's default list, so
|
||||
`'self'` is spelled out or every same-origin script, islands included,
|
||||
would be refused. `styleDirective.hashes` adds the one style Astro cannot
|
||||
hash itself: the inline View Transitions opt-in (`src/lib/inlineCss.ts`,
|
||||
docs/02 §6).
|
||||
- **The meta tag comes first.** A meta-tag CSP governs only what the parser
|
||||
meets *after* it, and Astro appends its tag at the end of `<head>` —
|
||||
behind `errors.js`, `theme.js`, `registerSW.js` and the analytics loader.
|
||||
`scripts/postbuild.mjs` (`pnpm postbuild:html`) moves it to directly after
|
||||
`<meta charset="utf-8">` on every page, so nothing in the document
|
||||
precedes the policy meant to cover it. Our head scripts are external,
|
||||
content-hashed `/_astro/` files (docs/02 §4) — covered by `'self'`, no
|
||||
hash needed.
|
||||
- **`_headers` must therefore carry only `frame-ancestors`.** A header CSP
|
||||
and a meta CSP are enforced as **two separate policies**, and a resource
|
||||
must satisfy both — so a `script-src 'self'` in `_headers` would intersect
|
||||
with the meta policy, drop Astro's hashes, and break every island.
|
||||
`frame-ancestors` is the one directive that must stay in the header,
|
||||
because meta-tag CSP ignores it by spec. `X-Frame-Options: DENY` backs it up.
|
||||
- **Verification** (re-run whenever islands or the config change): build,
|
||||
then for every page in `dist/**/*.html` recompute the SHA-256 of each
|
||||
inline `<script>`/`<style>` body and assert it appears in that page's meta
|
||||
policy. P1 ran this and every inline resource matched. This check is worth
|
||||
keeping as a build-time assertion — it fails loudly if Astro ever emits a
|
||||
snippet it does not hash.
|
||||
- **Verification is a build gate: `pnpm check:csp`** (`scripts/check-csp.mjs`,
|
||||
formerly `check-no-inline-styles` / `check:styles`), run inside
|
||||
`pnpm build` after `postbuild:html`. For every page in `dist/**/*.html` it
|
||||
fails on: **no CSP meta** at all (formerly a silent skip), **any
|
||||
`<script>` before the meta**, any `<style>` element whose SHA-256 is not
|
||||
in that page's own policy, any inline `<script>` body not in it (JSON-LD
|
||||
data blocks excepted), and **any `style` attribute** in any of HTML's
|
||||
three quoting forms. Then the e2e suite loads real pages in Chromium and
|
||||
fails on any `securitypolicyviolation` event (docs/11 §5), and in the
|
||||
field `errors.js` records violations into bug reports (docs/05 §A5) —
|
||||
a meta policy cannot carry `report-uri`/`report-to`, so that event is the
|
||||
only signal there is. **Check against `astro preview`, never `astro
|
||||
dev`**: the dev server emits no CSP meta, so a check there returns a false
|
||||
clean.
|
||||
- **Residual weakness, accepted:** Astro puts the union of known hashes in
|
||||
every page's policy (9 hashes on a page that uses 3). Still hash-pinned,
|
||||
never `'unsafe-inline'` — just less tight per page than it could be.
|
||||
every page's policy (2026-10-21 build: 7 script and 3 style hashes on
|
||||
every page, of which `/` uses 4 and 2, a legal page 3 and 2). Still
|
||||
hash-pinned, never `'unsafe-inline'` — just less tight per page than it
|
||||
could be.
|
||||
- **JSON-LD** (`<script type="application/ld+json">`) is a data block, not an
|
||||
executable script, so it needs no hash under `script-src` (docs/16 §7).
|
||||
`astro/no-unsafe-inline-scripts` bans hand-written inline script bodies in
|
||||
source; JSON-LD is allowed by that rule's defaults.
|
||||
- **`style-src` bans inline `style` ATTRIBUTES, not just `<style>` blocks.**
|
||||
Hashes do not apply to attributes — only `'unsafe-hashes'` or
|
||||
`'unsafe-inline'` would permit them, and the policy has neither. So any
|
||||
@@ -104,48 +171,129 @@ Notes:
|
||||
is how the sticky header shipped fully transparent, letting page content bleed
|
||||
through it (found 2026-07-28, after ~49 inline styles had accumulated).
|
||||
Every design token is therefore exposed as a Tailwind utility
|
||||
(`text-sh-muted`, `bg-sh-surface`, `border-sh-border`) in
|
||||
`src/styles/global.css`, and **`pnpm check:styles` fails the build if any
|
||||
`style=` reaches `dist/`**. Do not relax the policy to fix a styling bug.
|
||||
- **Cache-Control precedence.** Cloudflare `_headers` applies *every* matching
|
||||
rule, so the `/*` block's `must-revalidate` and the `/_astro/*` `immutable`
|
||||
rule both match hashed assets. Verify with
|
||||
`curl -sI https://softharbor.net/_astro/<file>` that the immutable value
|
||||
wins; if it does not, scope the HTML rule to `/*.html` instead of `/*`.
|
||||
(`text-sh-muted`, `bg-sh-surface`, `border-sh-control`) in
|
||||
`src/styles/global.css`, and **`pnpm check:csp` fails the build if any
|
||||
`style=` reaches `dist/`**. The same applies to **runtime** writes: an
|
||||
`el.style.*` assignment is refused too and no build check can see it —
|
||||
that is how sorting broke in production (docs/05 §A3); code never writes
|
||||
`el.style`. Do not relax the policy to fix a styling bug.
|
||||
- **Turnstile's iframe has its own CSP** and logs violations for probes it
|
||||
makes itself (`*.challenges.cloudflare.com` hosts). Those messages come
|
||||
from inside Cloudflare's frame, cannot be fixed from the page, and the e2e
|
||||
fixture ignores them; do not loosen ours in response.
|
||||
- `Strict-Transport-Security` is deliberately **absent from `_headers`**:
|
||||
it is configured once at the zone level with a phased max-age rollout
|
||||
(docs/16 §5) so it also rides on redirect responses. Keeping it out of
|
||||
`_headers` avoids two sources of truth with conflicting `max-age`.
|
||||
- `Access-Control-Allow-Origin: *` only on the intentionally-public dataset.
|
||||
- Verify after every deploy touching `_headers`:
|
||||
`curl -sI https://…/ | grep -iE 'content-security|frame|referrer'` +
|
||||
an observatory scan pre-launch (docs/13 §2).
|
||||
- Verify after every deploy touching `_headers` or the CSP (full block:
|
||||
docs/16 §10) — the header CSP must be exactly `frame-ancestors 'none'`,
|
||||
the meta policy must list the two Cloudflare origins, one hashed asset
|
||||
must carry a single `Cache-Control` — plus an observatory scan
|
||||
pre-launch (docs/13 §2):
|
||||
|
||||
```bash
|
||||
curl -sI https://softharbor.net/ | grep -iE 'content-security|frame|referrer|cache-control'
|
||||
curl -s https://softharbor.net/ | grep -o '<meta http-equiv="content-security-policy"[^>]*>'
|
||||
```
|
||||
|
||||
## 4a. The human check (`POST /api/verify`, D25)
|
||||
|
||||
Step 2 of the legal gate (docs/14 Part 2): after a visitor accepts the
|
||||
documents, Cloudflare Turnstile checks that a person — not a bot — is
|
||||
there, and the site's one Worker confirms the result with Cloudflare's
|
||||
Siteverify. Endpoint mechanics, statuses and secrets: docs/08 Part E; the
|
||||
client algorithm and timings: docs/05 §A9.
|
||||
|
||||
**What it is for — and what it is not.** It filters automated traffic
|
||||
politely; it is **not a lock**. SoftHarbor is a public static site: every
|
||||
page is served without asking, and the verdict only decides whether the
|
||||
gate remembers the visitor as checked (`sh:human`, 48 h) or lets them
|
||||
through unchecked (1 h). Every failure on our side — no secret, Siteverify
|
||||
down, rate limit hit, script blocked, timeout — **fails open**. A person is
|
||||
never locked out by an outage, and a bot that defeats it gains nothing a
|
||||
`curl` of the static pages would not already give it.
|
||||
|
||||
**Consent first.** Turnstile's `api.js` is requested only after the
|
||||
visitor accepts the Privacy Policy that describes it — never before (the
|
||||
e2e suite asserts that no Cloudflare request precedes acceptance).
|
||||
|
||||
**Server-side checks** (`worker/verify.ts`, `worker/http.ts`):
|
||||
|
||||
- **Same-origin only** — `Origin` must equal the origin the request arrived
|
||||
on (so previews and `wrangler dev` work without a host list).
|
||||
- **`Content-Type: application/json` exactly** — `text/plain` and form
|
||||
encodings, which a cross-site form or a no-preflight `fetch` can send, are
|
||||
refused (`415`).
|
||||
- **Bounded input** — `Content-Length` ≤ 4096 when declared, and the body is
|
||||
*counted while it streams*, so a body without a length is never buffered
|
||||
past the cap (`413`); `token` must be a non-empty string ≤ 2048 chars.
|
||||
- **The verdict is re-checked, not trusted** — Siteverify's `success` plus
|
||||
`hostname` equal to the request's host (a token minted on another site is
|
||||
refused), `action` equal to `legal_gate` (a token minted for another
|
||||
purpose is refused) and `challenge_ts` at most 300 s old.
|
||||
- **Replay-safe retry** — one retry on a network error or 5xx, with the
|
||||
*same* idempotency key, so the retry is answered instead of reporting the
|
||||
single-use token as spent.
|
||||
- **Rate limit** — Workers Rate Limiting, 20 verifications per 60 s per
|
||||
IPv4 address or IPv6 /64 (a host can rotate through its /64), per
|
||||
Cloudflare location; generous because a school or office shares one NAT
|
||||
address. Over the limit → `429` + `Retry-After: 60` → the gate fails open.
|
||||
- **Responses** — JSON, `Cache-Control: no-store`, and their own security
|
||||
headers (`default-src 'none'; frame-ancestors 'none'` CSP, CORP
|
||||
same-origin, `nosniff`, Referrer-Policy): `_headers` never applies to
|
||||
Worker responses.
|
||||
|
||||
**Privacy.** The token travels to Siteverify with the visitor's IP
|
||||
(`remoteip`); the IP is also the rate-limit key. Neither is stored or
|
||||
logged — Workers Logs keep `{event, outcome, ms}` only, invocation logs off.
|
||||
The secret is a runtime secret (`TURNSTILE_SECRET`), never in the repo.
|
||||
The Privacy Policy's `#turnstile` section says all of this to visitors, and
|
||||
the gate's step 2 links to it.
|
||||
|
||||
**Testing.** Unit tests cover every refusal, verdict and the retry
|
||||
(`worker/*.test.ts`) and the client's fail-open paths
|
||||
(`src/lib/turnstile.test.ts`). The e2e suite stands in for Cloudflare:
|
||||
`api.js` is served from its real URL (so the page CSP is exercised) and
|
||||
`/api/verify` — which `astro preview` does not run — answers 200, 503 or is
|
||||
blocked (docs/11 §5). What only production can show: the Worker, the
|
||||
secret and `_headers` — verified after each deploy (docs/13 §3).
|
||||
|
||||
## 5. Vulnerability reporting
|
||||
|
||||
`public/.well-known/security.txt`:
|
||||
|
||||
```
|
||||
Contact: mailto:contact@softharbor.net
|
||||
Contact: mailto:security@poli0981.dev
|
||||
Contact: https://github.com/poli0981/softharbor/security/advisories/new
|
||||
Preferred-Languages: en, vi
|
||||
Expires: 2027-07-20T00:00:00.000Z
|
||||
Expires: 2027-07-28T00:00:00.000Z
|
||||
Canonical: https://softharbor.net/.well-known/security.txt
|
||||
Policy: https://github.com/poli0981/softharbor/blob/main/SECURITY.md
|
||||
```
|
||||
|
||||
(The mailbox goes live via Email Routing before launch — docs/16 §6 / H5.)
|
||||
Served as `text/plain; charset=utf-8` (a `_headers` rule — RFC 9116 §3).
|
||||
Since 2026-10-21 the address is `security@poli0981.dev` (D27,
|
||||
`src/lib/contacts.ts`); `contact@softharbor.net` is retired everywhere.
|
||||
Mail for `poli0981.dev` is delivered to a Google-hosted mailbox (MX
|
||||
`aspmx.l.google.com`, docs/16 §6). `Expires` rolls forward yearly
|
||||
(docs/13 §6).
|
||||
|
||||
Root `SECURITY.md` (created in P6): supported target = latest deploy only;
|
||||
report via GitHub *Private vulnerability reporting* (action item H4) or the
|
||||
H5 email; acknowledgment ≤ 72 h; scope = the site, its workflows, and the
|
||||
Root `SECURITY.md`: supported target = latest deploy only; report via
|
||||
GitHub *Private vulnerability reporting* (action item H4) or
|
||||
`security@poli0981.dev`; acknowledgment ≤ 72 h; scope = the site, its
|
||||
build, its workflows, **the `/api/verify` endpoint** (`worker/`) and the
|
||||
dataset (wrong/dangerous link reports are explicitly welcome and handled via
|
||||
the quarantine flow); out of scope = vulnerabilities in *listed third-party
|
||||
apps themselves* → report to their vendors, but tell us too so we can flag.
|
||||
|
||||
## 6. Data-vetting checklist (before `security.status: "clean"`)
|
||||
|
||||
Run all steps; record date in `checkedAt`; link scan in `evidence` when
|
||||
available. This checklist is the *definition* of "clean".
|
||||
Run all steps before an entry is first marked `clean`, and again whenever
|
||||
its links change; link the scan in `evidence`. This checklist is the
|
||||
*definition* of "clean". Since 2026-10-23 `checkedAt` is the date of the
|
||||
**latest scan** (step 5): `vt-recheck.yml` re-runs that step at least every 90
|
||||
days and moves the date, while steps 1–4 stay with the maintainer (D30).
|
||||
|
||||
1. **Domain authenticity** — homepage/download domain matches the vendor's
|
||||
known official domain (cross-check the project's repo, Wikipedia infobox,
|
||||
@@ -158,15 +306,27 @@ available. This checklist is the *definition* of "clean".
|
||||
4. **Installer hygiene** — release notes/installer page shows no bundled
|
||||
third-party offers; if the vendor publishes checksums/signatures, note
|
||||
that on the entry's `tags` (`signed-releases`) — optional.
|
||||
5. **VirusTotal (when feasible)** — scan the download-page URL; for
|
||||
directly-linked binaries of less-known apps, scan the file. Paste the
|
||||
permalink into `evidence`.
|
||||
5. **VirusTotal** — scan the download-page URL; for directly-linked
|
||||
binaries of less-known apps, scan the file. The permalink goes into
|
||||
`evidence` — **required**: since v1.1 the schema refuses `clean` (and
|
||||
`flagged`) without an `evidence` URL (docs/04 §2). **Assisted since
|
||||
2026-10-23** (docs/12 §4b): `scripts/vt-recheck.mjs` submits
|
||||
`links.download` through the VirusTotal API and writes the permalink and
|
||||
date; dispatched on a data branch it scans a PR's new entries before
|
||||
merge, and daily on `main` it re-scans every check older than 90 days. It
|
||||
never decides `clean` or `flagged`: zero detections keep the status, any
|
||||
detection drops `clean` to `unverified` and opens a `[vt] <slug>` issue,
|
||||
and a promotion to `clean` happens only for slugs the maintainer lists
|
||||
(`promote`).
|
||||
6. **Judgment call** — anything uneasy ⇒ leave `unverified` (listable) or
|
||||
`flagged` (quarantine) — never "clean by default".
|
||||
|
||||
Flag procedure (any time after listing): set `status: "flagged"` via PR or
|
||||
let the quarantine workflow act on a maintainer-labeled issue; the workflow
|
||||
moves the file and opens the tracking issue (docs/12 §4).
|
||||
Flag procedure (any time after listing): set `status: "flagged"` and run
|
||||
`pnpm quarantine` in the same PR — `validate:data` fails a flagged entry
|
||||
left in `src/data/apps/`. If a flagged entry ever reaches `main` anyway, the
|
||||
quarantine workflow (on data pushes and nightly) moves it in a signed PR and
|
||||
opens the tracking issue (docs/12 §4). The workflow acts on files only — it
|
||||
does not read issue labels.
|
||||
|
||||
## 7. Supply-chain hygiene
|
||||
|
||||
@@ -188,29 +348,69 @@ moves the file and opens the tracking issue (docs/12 §4).
|
||||
Current allowlist, each entry a decision: `esbuild: true` (native binary,
|
||||
the build cannot run without it), `lefthook: true` (installs our git
|
||||
hooks), `workerd: false` (Cloudflare's local Worker runtime, pulled in by
|
||||
wrangler — we ship pure static assets and never run a Worker locally).
|
||||
Flipping any entry to `true` requires a decision-log line.
|
||||
- Renovate weekly + `osv-scanner` + `pnpm audit --prod` gate (docs/01 §5,
|
||||
docs/12 §6).
|
||||
- All GitHub Actions pinned to **commit SHAs** with a version comment.
|
||||
wrangler). The `workerd` comment in `pnpm-workspace.yaml` still says we
|
||||
"never run a Worker locally"; since D25 there is a Worker, but it is
|
||||
tested under Vitest in Node with a stubbed Siteverify and validated by
|
||||
`wrangler deploy --dry-run` in CI, neither of which needs `workerd`.
|
||||
Whether `wrangler dev` (with `.dev.vars`) runs with the script blocked:
|
||||
⚠ verify. Flipping any entry to `true` requires a decision-log line.
|
||||
- **`overrides`** in `pnpm-workspace.yaml` force patched floors for
|
||||
`brace-expansion` and `fast-uri`, each with the advisory ids in a comment;
|
||||
both reach us only through build tooling (`@vite-pwa/astro` →
|
||||
`workbox-build`), nothing ships to a visitor. Remove a line once
|
||||
upstream's own range moves past it. `peerDependencyRules` accepts
|
||||
`@vite-pwa/astro`'s stale Astro peer range explicitly (it works on
|
||||
Astro 7; `check:sw` proves it every build).
|
||||
- **pnpm 11's default 24 h `minimumReleaseAge`** refuses any release younger
|
||||
than a day; Dependabot's 2-day cooldown keeps its PRs installable under
|
||||
`--frozen-lockfile` (docs/12 §6).
|
||||
- **Dependabot** (weekly, npm + github-actions, docs/12 §6) replaced
|
||||
Renovate on 2026-10-21 — Renovate was never installed and never ran.
|
||||
Dependabot security updates are enabled in the repository settings.
|
||||
`osv-scanner` + `pnpm audit --prod` gate every PR and push to `main`
|
||||
(`ci.yml` `gates` job — docs/01 §5, docs/12 §2). CodeQL runs on PRs,
|
||||
pushes and weekly; SonarQube Cloud's CI-based analysis (`ci.yml` `sonar`
|
||||
job, `sonar-project.properties`) covers workflows, scripts and the site
|
||||
code, with coverage, on every PR and push to `main`.
|
||||
- All GitHub Actions in this repository's workflows pinned to **commit
|
||||
SHAs** with a version comment (Dependabot bumps both); the org's own
|
||||
reusable workflows (`poli0981/.github`) are tracked at `@main` on purpose.
|
||||
`notify.yml` passes the one secret it needs, not `secrets: inherit`.
|
||||
- **Signed commits** are required on `main` by the ruleset; the quarantine
|
||||
bot signs through the API (docs/12 §4/§8).
|
||||
- Dependency budget: adding any new runtime dependency requires a
|
||||
decision-log entry; prefer zero-dependency utilities.
|
||||
|
||||
## 8. Privacy (implementation-level; user-facing text in docs/14 §3b)
|
||||
|
||||
Client storage inventory — the complete list:
|
||||
Client storage inventory — the complete list. Every localStorage key has
|
||||
exactly one typed reader/writer in `src/lib/` (lint-enforced, docs/10 §3)
|
||||
— `theme.js` mirrors three of them pre-paint — which is what keeps this
|
||||
table true:
|
||||
|
||||
| Key / store | Content | Lifetime |
|
||||
|---|---|---|
|
||||
| `sh:legal` | accepted legal version string | until cleared |
|
||||
| `sh:lang` | `en` \| `vi` preference | until cleared |
|
||||
| `sh:legal` | accepted legal version string (`LEGAL_VERSION`) | until cleared |
|
||||
| `sh:human` | expiry timestamp (ms) of the human check: +48 h after a pass, +1 h when the gate let the visitor through unchecked (§4a) | self-expiring; until cleared |
|
||||
| `sh:lang` | `en` \| `vi` — the language suggestion was answered | until cleared |
|
||||
| `sh:theme` | `light` \| `dark` (absent = system) | until cleared |
|
||||
| SW cache | offline shell (offline page, fonts, favicon) | managed by Workbox |
|
||||
| Ring buffer | in-memory only (docs/05 §A5) | page lifetime |
|
||||
| `sh:scrollbar` | `thin` \| `hidden` (absent = default) | until cleared |
|
||||
| `sh:motion` | `reduce` (absent = follow the OS) | until cleared |
|
||||
| SW cache | offline page, its CSS, the three head scripts, the latin + Vietnamese body/display fonts, favicon | managed by Workbox |
|
||||
| Ring buffer | `window.__shErrors`, in memory only (docs/05 §A5) | page lifetime |
|
||||
| Session fallbacks | `globalThis` flags holding the gate's acceptance / check result when storage throws | page lifetime |
|
||||
|
||||
No cookies, no fingerprinting, no analytics (D14), no third-party requests
|
||||
(CSP-enforced). Network operator: Cloudflare serves requests and therefore
|
||||
processes IPs/logs as infrastructure provider under its own policies —
|
||||
disclosed in the Privacy Policy. Bug reports happen on GitHub under GitHub's
|
||||
terms; the prefilled URL shows the user *exactly* what would be submitted
|
||||
before they post it (docs/05 §A6) — nothing is sent automatically.
|
||||
**SoftHarbor sets no cookies** and does no fingerprinting. Who else sees
|
||||
what — the list the Privacy Policy mirrors (`/legal/privacy`):
|
||||
|
||||
| Party | When | What |
|
||||
|---|---|---|
|
||||
| Cloudflare (hosting) | every request | connection data such as IP addresses, as infrastructure provider under its own policy; we see aggregate counts only |
|
||||
| Cloudflare Web Analytics (D26) | page loads on `softharbor.net` only, **never** when `navigator.globalPrivacyControl === true` | page URL, referrer, load timings, user-agent; cookieless; we see totals |
|
||||
| Cloudflare Turnstile (D25) | once, after the documents are accepted | browser/device signals inside its iframe; the token plus IP go to Siteverify via our Worker (§4a) |
|
||||
| GitHub | only if the visitor opens "Report a bug" | the prefilled URL carries page URL, user-agent and recent error lines — GitHub receives them **when the link is opened**; nothing is filed until the visitor submits (docs/05 §A6) |
|
||||
| Google | only if someone emails us | `@poli0981.dev` mail is delivered to a Google-hosted mailbox |
|
||||
|
||||
Adding a party, a key or a store is a change to this table, to the
|
||||
Privacy Policy and — for a third-party runtime request — a decision-log
|
||||
entry (hard rule 7).
|
||||
+120
-37
@@ -14,20 +14,31 @@
|
||||
}
|
||||
```
|
||||
|
||||
Rules: no `any` (use `unknown` + narrowing); no non-null `!` outside tests;
|
||||
no `enum` (union literals); ESM only; type-only imports use `import type`.
|
||||
Shared types derive from Zod (`z.infer<typeof apps.schema>`) — never
|
||||
hand-duplicate the data shape.
|
||||
Rules: no `any` (use `unknown` + narrowing); no non-null `!` outside tests
|
||||
(lint-enforced; `*.test.ts` is the one exception); no `enum` (union
|
||||
literals); ESM only; type-only imports use `import type` (lint-enforced).
|
||||
Shared types derive from the collection schema (`CollectionEntry<'apps'>`)
|
||||
— never hand-duplicate the data shape. Under `exactOptionalPropertyTypes`,
|
||||
`foo?: string` means "absent or string", not "may be passed `undefined`":
|
||||
props filled from optional lookups say `| undefined` explicitly.
|
||||
|
||||
**Two deliberate non-TypeScript corners.** `src/scripts/*.js` (the head
|
||||
scripts — docs/02 §4) are plain *classic* browser JavaScript: Vite copies
|
||||
them verbatim, so no imports, no TypeScript, linted with browser globals in
|
||||
`sourceType: script`. `scripts/*.mjs` are plain Node and never import from
|
||||
`src/` or `astro:content`.
|
||||
|
||||
## 2. Naming
|
||||
|
||||
| Thing | Convention | Example |
|
||||
|---|---|---|
|
||||
| Components (static) | `Sh` + PascalCase `.astro` | `ShAppCard.astro`, `ShBadge.astro` |
|
||||
| Components (static) | `Sh` + PascalCase `.astro` | `ShAppCard.astro`, `ShIcon.astro` |
|
||||
| Page bodies | PascalCase `…Page.astro` in `components/pages/` | `AppDetailPage.astro` |
|
||||
| Islands | `Sh` + PascalCase `.svelte` in `components/islands/` | `ShSearch.svelte` |
|
||||
| Lib modules | camelCase `.ts` | `issueUrl.ts` |
|
||||
| Constants | SCREAMING_SNAKE | `LEGAL_VERSION`, `BUDGET` |
|
||||
| Constants | SCREAMING_SNAKE | `LEGAL_VERSION`, `BUDGET`, `PASS_TTL_MS` |
|
||||
| CSS custom props | `--sh-*` | `--sh-accent` |
|
||||
| CSS classes (global) | `sh-*` | `sh-panel`, `sh-anim`, `sh-nudge-x` |
|
||||
| localStorage | `sh:` prefix | `sh:theme` |
|
||||
| Data files | slug kebab-case | `7-zip.json` |
|
||||
| Branches | `feat/…`, `fix/…`, `data/…`, `docs/…`, `chore/…` | `data/add-vscodium` |
|
||||
@@ -35,49 +46,101 @@ hand-duplicate the data shape.
|
||||
Islands are leaf components: an island never imports another island;
|
||||
cross-island communication goes through nanostores only.
|
||||
|
||||
**Contacts are never hard-coded.** Every email address on the site — pages,
|
||||
legal documents — comes from `src/lib/contacts.ts` (D27); `security.txt`,
|
||||
`SECURITY.md` and the other root files must match it.
|
||||
|
||||
## 3. Lint & format
|
||||
|
||||
`eslint.config.js` (flat): `typescript-eslint` strict-type-checked +
|
||||
`eslint-plugin-astro` + `eslint-plugin-svelte` recommended sets, plus
|
||||
project rules:
|
||||
`eslint.config.js` (flat): `@eslint/js` recommended + `typescript-eslint`
|
||||
**strict** + `eslint-plugin-astro` + `eslint-plugin-svelte` recommended
|
||||
sets; on `.ts` files, type-aware rules via `projectService`
|
||||
(`consistent-type-imports`, `no-floating-promises`, `no-misused-promises`,
|
||||
`await-thenable`, `no-unnecessary-type-assertion` — every island awaits a
|
||||
fetch or a dynamic import). Project rules:
|
||||
|
||||
- `no-restricted-syntax` bans `set:html` (T4) and direct
|
||||
`localStorage`/`document.cookie` access outside `src/lib/` (all storage
|
||||
goes through typed helpers).
|
||||
- `no-restricted-imports` bans importing `minisearch` outside
|
||||
`src/lib/search.ts` and `src/pages/search-index.json.ts`.
|
||||
- **`astro/no-set-html-directive`** bans `set:html` (T4). (An earlier
|
||||
hand-rolled `no-restricted-syntax` selector matched nothing for months —
|
||||
never replace this with a custom selector.) **One carve-out, scoped to
|
||||
five named files**, each injecting only build-time or constant markup:
|
||||
`ShIcon.astro` (Lucide SVG via `src/lib/icon.ts` — *the* UI-icon
|
||||
component, so the carve-out covers one component instead of every page),
|
||||
`ShAppCard.astro` and `AppDetailPage.astro` (app logos via
|
||||
`src/lib/logo.ts`), `ShJsonLd.astro` (JSON-LD, `<` escaped) and
|
||||
`Base.astro` (the one inline style constant, `src/lib/inlineCss.ts`).
|
||||
The only data-derived input is a schema-constrained icon/logo **key**,
|
||||
never interpolated into markup; an unknown key throws at build time.
|
||||
- **`astro/no-unsafe-inline-scripts`** — Astro hashes only the scripts it
|
||||
bundles, so a hand-written inline `<script>` body would ship unhashed and
|
||||
be refused by the browser. JSON-LD data blocks are allowed.
|
||||
- **`no-restricted-globals: localStorage`** everywhere in `src/` except
|
||||
`src/lib/` — all storage goes through the typed helpers (`legal.ts`,
|
||||
`human.ts`, `theme.ts`, `prefs.ts`, `lang.ts`), so every key has exactly
|
||||
one reader and writer and the privacy inventory (docs/09 §8) stays true.
|
||||
- `src/scripts/*.js` lint as classic browser scripts; `scripts/**` and root
|
||||
configs with Node globals.
|
||||
|
||||
MiniSearch is imported statically only by `src/lib/search.ts` (build time)
|
||||
and dynamically by `src/lib/searchIndex.ts` (client) — a convention, not a
|
||||
lint rule (`searchOptions.ts` must stay free of it, or the library lands
|
||||
back in every page's bundle).
|
||||
|
||||
**Icons.** In `.astro`: `<ShIcon name="arrow-right" motion="nudge-x" />` —
|
||||
build-time Lucide, decorative unless given a `label`. In islands:
|
||||
`import IconX from '~icons/lucide/x'` (`unplugin-icons`, `compiler:
|
||||
'svelte'`). Never an `<img>` icon, never a runtime fetch.
|
||||
|
||||
**No inline styles — ever.** No `style="…"` attribute in markup and no
|
||||
`el.style.*` write at runtime: CSP `style-src` drops both silently (docs/09
|
||||
§4). Use Tailwind utilities — every design token is one (`text-sh-muted`,
|
||||
`bg-sh-surface`, `border-sh-control`, `shadow-sh-2`) — or a class in
|
||||
`global.css`; hide with the `hidden` attribute, reorder by moving nodes.
|
||||
`pnpm check:csp` fails the build on any `style=` in `dist/`; runtime writes
|
||||
are caught only by the e2e suite's CSP-violation check, so do not write
|
||||
them.
|
||||
|
||||
Prettier 3 + `prettier-plugin-astro` + `prettier-plugin-svelte` +
|
||||
`prettier-plugin-tailwindcss` (class sorting). No style debates: Prettier
|
||||
wins; ESLint covers correctness only.
|
||||
wins; ESLint covers correctness only. `docs/` and `CLAUDE.md` are
|
||||
Prettier-ignored on purpose — they are hand-wrapped at ~76 columns with
|
||||
hand-aligned tables.
|
||||
|
||||
## 4. Dead code & hooks
|
||||
|
||||
`knip.json`: entries = `astro.config.ts`, `src/pages/**`, `scripts/*.mjs`;
|
||||
knip runs in CI; unused exports/deps fail the build.
|
||||
`knip.json`: entries = `src/pages/**/*.{astro,ts}`, `scripts/*.mjs`,
|
||||
`src/scripts/*.js`; project = `src/**`, `scripts/**`, `e2e/**`,
|
||||
`worker/**`; the Fontsource packages and `tailwindcss` are ignored as
|
||||
dependencies (they are imported from CSS, which knip does not read). knip
|
||||
runs in CI (`build` job); unused files, exports or deps fail it.
|
||||
|
||||
`lefthook.yml`:
|
||||
`lefthook.yml` (lefthook 2 `jobs:` syntax):
|
||||
|
||||
```yaml
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
format:
|
||||
jobs:
|
||||
- name: format
|
||||
glob: '*.{ts,js,mjs,astro,svelte,css,json,jsonc,yml,yaml,md}'
|
||||
exclude: ['src/data/apps/*.json']
|
||||
run: pnpm prettier --write {staged_files}
|
||||
stage_fixed: true # fix-and-restage beats fail-and-retype
|
||||
lint:
|
||||
- name: format-data # by directory: a bulk data change once
|
||||
glob: 'src/data/apps/*.json' # overran Windows' 8 KB command line
|
||||
run: pnpm prettier --write src/data/apps
|
||||
stage_fixed: true
|
||||
- name: lint
|
||||
glob: '*.{ts,js,mjs,astro,svelte}'
|
||||
run: pnpm eslint {staged_files}
|
||||
data:
|
||||
- name: data
|
||||
glob: 'src/data/**'
|
||||
run: pnpm validate:data
|
||||
i18n: # separate glob — see docs/07 §3
|
||||
- name: i18n # separate glob — see docs/07 §3
|
||||
glob: 'src/i18n/**'
|
||||
run: pnpm i18n:check
|
||||
pre-push:
|
||||
commands:
|
||||
test: { run: pnpm test }
|
||||
jobs:
|
||||
- name: test
|
||||
run: pnpm test
|
||||
```
|
||||
|
||||
The `data` and `i18n` hooks are two commands on two globs on purpose. Folding
|
||||
@@ -89,15 +152,21 @@ break parity would be the one edit that skips the gate.
|
||||
|
||||
Conventional Commits, lowercase, imperative: `feat:`, `fix:`, `data:`
|
||||
(dataset changes — custom type, allowed), `docs:`, `chore:`, `ci:`,
|
||||
`refactor:`, `test:`. Scope optional (`feat(search): …`). One logical
|
||||
change per PR; PR description links the doc section it implements. Squash
|
||||
merge; the squash title must itself be a valid conventional commit (it
|
||||
feeds the changelog).
|
||||
`refactor:`, `test:`. Scope optional (`feat(search): …`); Dependabot uses
|
||||
`fix(deps)` / `chore(deps)` / `ci`. One logical change per PR; PR
|
||||
description links the doc section it implements.
|
||||
|
||||
Commits are **signed** — the `main` ruleset rejects unsigned ones (docs/12
|
||||
§8). **Squash is the only merge method**: GitHub cannot sign a rebase merge
|
||||
under that rule, and a merge commit breaks the required linear history. The
|
||||
squash title must itself be a valid conventional commit (it feeds the
|
||||
changelog), and the squash body lists every commit subject of the branch.
|
||||
|
||||
## 6. License headers
|
||||
|
||||
Every `.ts/.mjs/.astro/.svelte` source file starts with the short SPDX
|
||||
form:
|
||||
Every `.ts/.mjs/.js/.astro/.svelte/.css` source file starts with the short
|
||||
SPDX form (as a `/* */` block in `.js`/`.css`, an HTML comment in
|
||||
`.svelte`):
|
||||
|
||||
```ts
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
@@ -117,10 +186,24 @@ same PR — divergence is a defect.
|
||||
|
||||
## 8. Definition of Done (per PR)
|
||||
|
||||
1. `pnpm lint` + `pnpm test` + `pnpm build` + `pnpm validate:data` +
|
||||
`pnpm i18n:check` green.
|
||||
2. New/changed behavior covered by a unit test when it lives in `src/lib/`.
|
||||
3. Both locales updated when a UI string changed (CI parity check green).
|
||||
4. No new dependency without a decision-log line (docs/15 §4).
|
||||
1. `pnpm lint` + `pnpm check` + `pnpm coverage` (thresholds hold) +
|
||||
`pnpm build` (which runs validate:data, i18n:check and every `dist/`
|
||||
gate) + `pnpm knip` + `pnpm e2e` (after the build) green — CI runs all of
|
||||
them and none is advisory.
|
||||
2. New/changed behavior covered by a test where it lives: a unit test in
|
||||
`src/lib/`, an island test for island state, a script test for a build
|
||||
script, a Worker test for `worker/`, an e2e test for anything only a
|
||||
real browser shows (CSP, top layer, layout).
|
||||
3. Both locales updated when a UI string changed (CI parity check green),
|
||||
keys kept alphabetical.
|
||||
4. No new dependency without a decision-log line (docs/15 §4); no new
|
||||
third-party runtime origin or Worker route without one either (hard
|
||||
rules 1 and 7).
|
||||
5. Docs updated in the same PR when behavior diverges from `docs/**`.
|
||||
6. For data PRs: vetting checklist run (docs/09 §6), `checkedAt` fresh.
|
||||
6. For data PRs: vetting checklist run (docs/09 §6), `checkedAt` fresh,
|
||||
`evidence` linked for `clean`.
|
||||
7. Legal text changed materially (Disclaimer, Terms, Privacy) →
|
||||
`LEGAL_VERSION` bumped with `LEGAL_UPDATED` (docs/14 Part 2); a test
|
||||
enforces it.
|
||||
8. After the squash merge: the "Workers Builds" check on the merge commit
|
||||
is green and production is verified (docs/13 §3).
|
||||
+121
-28
@@ -3,38 +3,70 @@
|
||||
## 1. Shape
|
||||
|
||||
```
|
||||
▲ manual: launch checklist (docs/13 §2) — a11y, visual VI diacritics,
|
||||
│ real-device offline, screen readers
|
||||
│ build-as-integration-test: astro build + validate-data + parity
|
||||
│ + lychee (offline mode) over dist/ internal links
|
||||
│ unit (vitest): src/lib/** — the only place real logic lives
|
||||
▲ manual: launch checklist (docs/13 §2) — screen readers, visual VI
|
||||
│ diacritics, real-device offline, production-only checks
|
||||
│ e2e (Playwright + axe): the BUILT site under `astro preview`,
|
||||
│ desktop Chrome + Pixel 7 — docs/11 §5
|
||||
│ build-as-integration-test: `pnpm build` and its gates —
|
||||
│ validate:data, i18n:check, check:csp, check:assets,
|
||||
│ check:sw, check:feed (docs/12 §2)
|
||||
│ Vitest, four projects: unit · islands · scripts · worker
|
||||
▼
|
||||
```
|
||||
|
||||
No Playwright in v1 (decision: the site has six islands and no forms;
|
||||
build + units + the checklist cover it). Revisit post-v1 if islands grow.
|
||||
**Playwright is in, since v1.1 — this reverses v1's "No Playwright in v1"**
|
||||
(decision log, docs/15 §4). The old reasoning — six islands, no forms,
|
||||
build + units + a checklist cover it — did not survive contact with this
|
||||
stack: the bugs that actually shipped were a script or style the CSP
|
||||
silently refused, a dialog the platform could dismiss, an island that threw
|
||||
on hydration, a page that overflowed a phone — every one with all unit
|
||||
tests green. Only a real browser on the real build sees them.
|
||||
|
||||
**Island tests run in happy-dom** (added in S4). `vitest.config.ts` declares
|
||||
two projects: `unit` (node, `src/lib/**`) and `islands` (happy-dom,
|
||||
`src/components/**`), the latter with `resolve.conditions: ['browser']` or
|
||||
Svelte resolves to its SSR build and `mount()` throws. This is not a
|
||||
substitute for Playwright and does not pretend to be: it asserts island
|
||||
*state machines* — open/close, keyboard interception, lifecycle across
|
||||
simulated `astro:after-swap` — never layout, top-layer stacking, or visual
|
||||
appearance. Those stay on the manual checklist (docs/13 §2).
|
||||
**Vitest projects** (`vitest.config.ts`, all via `getViteConfig` so tests
|
||||
resolve and compile exactly like the build):
|
||||
|
||||
| Project | Environment | Includes | Asserts |
|
||||
|---|---|---|---|
|
||||
| `unit` | node (a file may opt into happy-dom) | `src/{lib,i18n,styles,scripts}/**/*.test.ts`, `src/pages/**/_*.test.ts`, `src/*.test.ts` | pure logic, plus `contrast.test.ts` reading `global.css` (docs/06 §2); the Zod schema (`content.config.test.ts`) and the three data endpoints (`src/pages/_endpoints.test.ts` — the `_` keeps it out of routing) with `astro:content` stubbed; the verbatim head scripts re-imported per test in happy-dom (`src/scripts/head.test.ts`) |
|
||||
| `islands` | happy-dom, `resolve.conditions: ['browser']` (else Svelte resolves to its SSR build and `mount()` throws) | `src/components/**/*.test.ts` | island *state machines* — open/close, keyboard interception, storage, fail-open paths — never layout or the top layer (that is e2e) |
|
||||
| `scripts` | node | `scripts/**/*.test.ts` | the **real** build scripts, run as child processes inside throwaway project trees (`scripts/fixture.ts`), exit code and all |
|
||||
| `worker` | node | `worker/**/*.test.ts` | `/api/verify` against a stubbed Siteverify — Node has every Web API it uses |
|
||||
|
||||
**Coverage** (`pnpm coverage`, V8) measures every analysed source since
|
||||
2026-10-23: `src/lib/**`, `src/i18n/**`, `src/scripts/*.js`, the endpoints
|
||||
in `src/pages/**/*.ts`, `src/content.config.ts`, the island `.svelte` files,
|
||||
`worker/**` **and the build scripts** — they run as child processes, and
|
||||
`coverage.autoAttachSubprocess` (Vitest 5) hands each child
|
||||
`NODE_V8_COVERAGE`, so their real runs count. Never also import a script
|
||||
in-process: Vitest merges the two kinds of coverage for one file wrongly.
|
||||
Thresholds are a **ratchet**: statements 96 · branches 85 · functions 95 ·
|
||||
lines 97, just under the measured 96.7 / 85.6 / 95.5 / 97.6 (2026-10-23;
|
||||
they were 93/78/90/93 over the narrower scope). Raise them when coverage
|
||||
rises; never lower them to land a change. CI runs `pnpm coverage` as *the*
|
||||
unit step, so a drop fails the PR, and the `sonar` job sends the same
|
||||
`coverage/lcov.info` to SonarQube Cloud (docs/12 §2), which indexes no
|
||||
`.svelte`/`.astro` file — the islands' entries are reported unresolved — and
|
||||
excludes only the root `*.config.*` files.
|
||||
|
||||
## 2. Unit targets (`vitest`)
|
||||
|
||||
| Module | Cases |
|
||||
|---|---|
|
||||
| `normalize.ts` | full vector table docs/05 §A1 incl. NFC vs NFD inputs, `đ/Đ`, whitespace collapse, empty string |
|
||||
| `search.ts` | index round-trip (`toJSON`/`loadJSON`); `trinh duyet` → browsers; prefix (`fire` → Firefox); fuzzy (see note); AND semantics; empty query behavior; `tags` array flattened by `extractField` |
|
||||
| `stores.ts` + filter fn | OR-within/AND-across facets; clear-all; sort orders incl. VN names |
|
||||
| `issueUrl.ts` | budget respected; truncation drops oldest lines first; empty buffer; URL-encoding of `#`/`&`/newlines |
|
||||
| feed builder | deterministic output; top-50 cutoff; stable guid |
|
||||
| `i18n/index.ts` | var substitution; missing-key fallback; parity assertion (en/vi key sets equal — the same check CI runs) |
|
||||
| `legal.ts` | version equality (stale **and** newer both re-open); garbage value; route exemptions incl. near-miss paths (`/legalish`, `/offlinely` must stay gated); hostile localStorage fails open per session |
|
||||
| `validate-data.mjs` | fixture-based: dup slug, dup name (diacritic-insensitive), unknown category, http URL, flagged-in-main-tree each produce the right error row |
|
||||
| `search.ts` / `searchIndex.ts` | index round-trip (`toJSON`/`loadJSON`); `trinh duyet` → browsers; prefix (`fire` → Firefox); fuzzy (see note); AND semantics; empty query behavior; `tags` array flattened by `extractField`; one download per page; a failed load reported and retried |
|
||||
| `stores.ts` + `filter.ts` + `grid.ts` | OR-within/AND-across facets, empty facet = no constraint; sort orders incl. VN names, locale-independent collation, relevance rank; DOM reorder by node moves and never an inline style (checked to fail against the old `style.order` version); cleared query drops cached hits; plural count templates. "Clear all" end to end: e2e |
|
||||
| `urlstate.ts` | parse/serialize round-trip; junk facet values and unknown sorts dropped; stable key order; default view → empty string |
|
||||
| `issueUrl.ts` / `ringbuffer.ts` | budget respected; truncation drops oldest lines first; empty buffer; URL-encoding of `#`/`&`/newlines; reader tolerates a missing buffer |
|
||||
| `feed.ts` | deterministic output; top-50 cutoff; stable guid; export sorted by slug |
|
||||
| `i18n/index.ts` | var substitution; an unreplaced placeholder stays visible; parity assertion (en/vi key sets equal — the same check CI runs), no empty value, VI actually translated; locale routing — `canonicalPath()` strips `.html`, `localePair()` symmetric |
|
||||
| `legal.ts` | version equality (stale **and** newer both re-open); garbage value; hostile localStorage fails open per session; **every accepted document's `LEGAL_UPDATED` ≤ `LEGAL_VERSION`**; every date real and past. (Route exemptions left this module — pages declare `gateExempt`; e2e covers them.) |
|
||||
| `human.ts` / `turnstile.ts` | 48 h / 1 h lifetimes; far-future and garbage values refused; memory fallback; `api.js` injected once; timeouts, 403 → fresh challenge (max 3), every other failure → *unverified*, never a throw |
|
||||
| `theme.ts` / `prefs.ts` / `lang.ts` | defaults on garbage; system/auto stored as "no key"; **`prefs.test.ts` runs the real `src/scripts/theme.js`** so pre-paint and island rules cannot drift |
|
||||
| `licenses.ts` / `logo.ts` / `paths.ts` | generated package table (installed versions, legacy and missing licenses); logo forms incl. monogram, no `style` attribute, escaped initials; category-page order (`byAddedDesc`) |
|
||||
| `contrast.test.ts` | WCAG ratios for every token pair, both themes; no-JS dark block identical to the dark theme (docs/06 §2) |
|
||||
| `scripts/*` (scripts project) | `validate-data` (each rule → its error row), `check-csp`, `check-i18n-parity`, `check-service-worker`, `check-feed`, `quarantine` — real script, temp tree, exit code |
|
||||
| `worker/*` (worker project) | method, origin, media type, size (declared and streamed), token shape, rate limit, Siteverify verdicts (host, action, age, test secrets), retry with the same idempotency key, 503 without a secret, security headers on every response |
|
||||
| islands | one test file per island (`Sh*.test.ts`): gate steps and Esc handling, search races and URL writes, filter sheet counts, language switch carrying the query, display menu storage, bug-report URL |
|
||||
|
||||
**Fuzzy vectors — resolved by S2 (2026-07-27), decision D22.** The old
|
||||
`gmip` → GIMP case is a *transposition* (2 edits on 4 characters) and needs
|
||||
@@ -45,8 +77,9 @@ spelled `gimp` from being an exact match (table in docs/05 §A2). It was
|
||||
also pins the *precision* side — `gimp` → only GIMP, `archiver` → only 7-Zip
|
||||
— so a future fuzzy miss cannot be "fixed" by raising the constant.
|
||||
|
||||
Coverage gates: `src/lib/**` ≥ 90 % lines (normalize/issueUrl at 100 %);
|
||||
no gate on `.astro/.svelte` (rendered output is checked by build + manual).
|
||||
Coverage gates: the global ratchet in §1 (statements 96 · branches 85 ·
|
||||
functions 95 · lines 97) over everything listed there. `.astro` files carry no coverage gate — their rendered output is
|
||||
checked by the build gates and the e2e suite.
|
||||
|
||||
## 3. P0 spikes — run before feature work (phase P1)
|
||||
|
||||
@@ -73,7 +106,8 @@ changed the spec:
|
||||
2. Island hydration emits inline scripts ⇒ D18 unachievable, replaced by the
|
||||
split CSP of D20 (docs/09 §4). ClientRouter itself is external, so View
|
||||
Transitions are safe.
|
||||
3. TypeScript 7 breaks `astro check` ⇒ hold at 6.x (D21).
|
||||
3. TypeScript 7 breaks `astro check` ⇒ hold at 6.x (D21; since 2026-10-23
|
||||
TS 6 and TS 7 run side by side — docs/01 §2).
|
||||
4. `ignore-scripts=true` does **not** "break nothing" — it stops the build
|
||||
outright, and pnpm ≥ 10 supersedes it anyway (docs/09 §7).
|
||||
|
||||
@@ -91,6 +125,9 @@ Neither is optional — both change shipped behavior:**
|
||||
*If it fails:* drop `<ClientRouter />` — and with it View Transitions
|
||||
(docs/02 §6, docs/06 §7). Log the branch taken. Do **not** resolve this by
|
||||
adding hashes back without re-reading docs/09 §4.
|
||||
*(Answered by D20 in P1. ClientRouter itself was later dropped anyway —
|
||||
2026-10-21, for native cross-document transitions — because its soft
|
||||
navigation kept the first page's meta CSP; docs/02 §6.)*
|
||||
2. **`trailingSlash: 'never'` × Workers `html_handling`.** (docs/02 §4/§7.)
|
||||
Deploy and `curl -sI` **both** `/apps/7-zip` and `/apps/7-zip/`.
|
||||
*Exit:* exactly one canonical URL returns 200 and the other 301s to it —
|
||||
@@ -168,6 +205,16 @@ items (docs/13 §2), because the environment has no browser: real top-layer
|
||||
stacking/backdrop, actual focus trapping by the UA, and "no visual flash".
|
||||
The tests assert the *state machine* that drives those, not their rendering.
|
||||
|
||||
**S4 superseded, 2026-10-21.** `<ClientRouter />` is gone (docs/02 §6), so
|
||||
there is no swap to survive: the gate mounts on every non-exempt page, with
|
||||
no `transition:persist` and no `astro:after-swap` re-assert, and it carries
|
||||
only its own page's strings. Both design bugs above are therefore gone by
|
||||
construction. Exemptions moved from a path regex to a page-declared
|
||||
`gateExempt`. The browser-only gaps listed above are now covered by
|
||||
Playwright (`e2e/gate.spec.ts`, §5): real top layer, Esc pressed twice
|
||||
against Chromium's close-watcher, `closedby="none"`, persistence across a
|
||||
reload, exempt pages. Screen-reader and visual checks stay manual.
|
||||
|
||||
### S5 — PWA offline on the real origin
|
||||
- **Goal:** offline fallback works where users are: `softharbor.net`.
|
||||
- **Method:** deploy the spike build (a versioned preview URL is fine for
|
||||
@@ -214,6 +261,52 @@ verified without one.
|
||||
|
||||
## 4. Continuous wiring
|
||||
|
||||
CI order (docs/12 §2): install → lint → test → validate:data → build →
|
||||
lychee(dist, internal) — failure anywhere blocks merge. The weekly external
|
||||
link check and CodeQL run on schedule, not per-PR.
|
||||
CI (`ci.yml`, docs/12 §2), every PR and push to `main` — failure anywhere
|
||||
blocks merge:
|
||||
|
||||
- **`build` job:** install (frozen) → `pnpm lint` → `pnpm check` →
|
||||
`pnpm coverage` (the unit run, thresholds enforced) → `pnpm build`
|
||||
(validate:data → i18n:check → astro build → postbuild:html → check:csp →
|
||||
check:assets → check:sw → check:feed; 701 pages) → `wrangler deploy
|
||||
--dry-run` (bundles `worker/`, validates `wrangler.jsonc`) → `pnpm knip` →
|
||||
Playwright e2e on that build (Chromium cached per Playwright version; the
|
||||
HTML report uploaded as an artifact on failure).
|
||||
- **`gates` job:** validate:data, i18n:check, osv-scanner, `pnpm audit
|
||||
--prod`, and on PRs a lychee sweep of the official links the PR changed.
|
||||
|
||||
CodeQL also runs per PR (its check is required). The weekly full link
|
||||
sweep runs on schedule (docs/12 §5). There is no lychee pass over `dist/`
|
||||
internal links; `check:assets` verifies every same-origin asset a page
|
||||
references, and page-to-page links are covered by the e2e page set.
|
||||
|
||||
## 5. End-to-end (Playwright + axe)
|
||||
|
||||
`playwright.config.ts`, specs in `e2e/`. Runs against the **built** site
|
||||
served by `astro preview` on `127.0.0.1:4321` — the per-page meta CSP is
|
||||
exactly as shipped (`ASTRO_PREVIEW_BACKGROUND=0` keeps the server in the
|
||||
foreground; Astro ≥ 7.2 backgrounds it under CI). Two projects: `desktop`
|
||||
(Desktop Chrome) and `mobile` (Pixel 7 — bottom sheets, the wrapped header,
|
||||
touch targets). CI: one retry, traces kept on failure, report artifact.
|
||||
|
||||
**Shared fixture** (`e2e/fixtures.ts`, auto-applied): a test **fails** if
|
||||
its page logged a console error, threw an uncaught exception, or fired a
|
||||
`securitypolicyviolation` (collected by an init script — the meta policy
|
||||
cannot report anywhere else). Messages from inside Cloudflare's Turnstile
|
||||
iframe are ignored (its own CSP probes, docs/09 §4); a test may whitelist an
|
||||
expected line (Chrome's "status of 404" on the 404 test). Helpers:
|
||||
`acceptGate()` pre-seeds `sh:legal` and `sh:human` for tests about
|
||||
something else; `stubTurnstile()` serves a fake `api.js` **from its real
|
||||
URL** (so the page CSP is still exercised) and answers `/api/verify` — which
|
||||
`astro preview` does not run — with 200, 503, or blocks the script;
|
||||
`waitForIsland()` waits for hydration; `settled()` waits for entrance
|
||||
animations before axe measures contrast.
|
||||
|
||||
| Spec | Covers |
|
||||
|---|---|
|
||||
| `smoke.spec.ts` | 15 pages in both locales (home, grid, detail, categories, legal, offline, contact): status < 400, an `h1`, a resolved `data-theme`, **no horizontal overflow**; an unknown URL → real 404 without the gate; **axe** (WCAG 2.0/2.1 A+AA, 2.2 AA tags) on five pages in **light and dark**, serious/critical findings fail |
|
||||
| `gate.spec.ts` | blocks a first visit until accepted *and* checked; Esc twice cannot dismiss; **no Cloudflare request before acceptance**; check remembered ~48 h across a reload; blocked script or 503 → visitor let through with the "skipped" note and a 1 h retry; a lapsed check re-runs step 2 only; linked documents and error/offline pages are exempt |
|
||||
| `prefs-search.spec.ts` | display choices apply at once and are restored pre-paint on the next document; `/` from any page lands focused in `/apps#search`; Vietnamese search ignores diacritics, writes `?q=` and switches to "Best match"; a shared URL restores the view and "Clear all" really clears it |
|
||||
|
||||
**Not covered here, by design:** `_headers` and the Worker — `astro
|
||||
preview` applies neither. They are verified on the Workers Builds preview
|
||||
URL and in production after each merge (docs/13 §3).
|
||||
+359
-116
@@ -3,41 +3,64 @@
|
||||
## 1. Overview
|
||||
|
||||
```
|
||||
PR ──▶ ci (build + gates, both local) ──▶ review ──▶ squash to main
|
||||
PR ──▶ ci (build + gates) + codeql ──▶ review ──▶ squash (signed) to main
|
||||
│
|
||||
┌─────────────────────────────────┤
|
||||
▼ ▼
|
||||
Cloudflare Workers Builds quarantine.yml (paths)
|
||||
(git integration — NOT a workflow)
|
||||
cron ─▶ link-check.yml (weekly) · quarantine.yml (nightly) · codeql · renovate
|
||||
queued ─▶ build ─▶ deploy ─▶ verify production (docs/13 §3)
|
||||
cron ─▶ link-check (weekly) · quarantine (nightly) · codeql (weekly)
|
||||
· Dependabot (weekly, Mon)
|
||||
release published ─▶ notify.yml ─▶ Discord
|
||||
```
|
||||
|
||||
**Deployment is not a GitHub workflow.** The repository is connected to
|
||||
Cloudflare via the Workers dashboard git integration, which builds and deploys
|
||||
on every push to `main` and produces PR previews itself. `deploy.yml` and
|
||||
`preview.yml` were removed on 2026-07-28: they duplicated that pipeline, and
|
||||
they failed anyway — the API token they used carries Workers scopes but not
|
||||
**Zone → Workers Routes → Edit** / **Zone → DNS → Edit**, which
|
||||
`wrangler deploy` needs the moment `wrangler.jsonc` declares a `custom_domain`
|
||||
(`Authentication error [code: 10000]`). The dashboard integration deploys with
|
||||
account-level credentials and has no such gap.
|
||||
Cloudflare via the Workers dashboard git integration (Workers Builds), which
|
||||
builds with `pnpm run build` and deploys with `npx wrangler deploy` on every
|
||||
push to `main`, and builds PR previews with `wrangler versions upload`.
|
||||
`deploy.yml` and `preview.yml` were removed on 2026-07-28: they duplicated
|
||||
that pipeline, and they failed anyway — the API token they used carries
|
||||
Workers scopes but not **Zone → Workers Routes → Edit** / **Zone → DNS →
|
||||
Edit**, which `wrangler deploy` needed while `wrangler.jsonc` declared a
|
||||
`custom_domain` (`Authentication error [code: 10000]`). The dashboard
|
||||
integration deploys with account-level credentials and has no such gap.
|
||||
|
||||
Consequences worth knowing:
|
||||
|
||||
- `wrangler.jsonc` is still the source of truth for routes and asset handling —
|
||||
Workers Builds runs `wrangler deploy` against it, so the two custom domains
|
||||
(§16 §3) and `html_handling` still apply.
|
||||
- The **build environment is now Cloudflare's**, not a GitHub runner. It must
|
||||
match `.nvmrc` (Node 24) and use pnpm, or the deployed output can differ from
|
||||
what CI validated. Verify after any toolchain bump (docs/13 §2).
|
||||
- `wrangler.jsonc` is still the source of truth for the Worker, its bindings
|
||||
and asset handling — Workers Builds runs `wrangler deploy` against it. It
|
||||
declares **no routes** since 2026-07-28: the two custom domains are
|
||||
attached in the dashboard (docs/16 §3), and a deploy leaves them alone.
|
||||
- **Workers Builds runs one build at a time.** After a burst of PR pushes a
|
||||
`main` merge can wait ~20 minutes before its build starts; superseded
|
||||
queued builds of `main` may be skipped (observed 2026-10-21: `ff95578`
|
||||
never deployed, `3743cfb` did). The "Workers Builds" check run appears on
|
||||
a `main` commit only once its build starts. Hence the release step: wait
|
||||
for that check to go green, *then* verify production (§3, docs/13 §3).
|
||||
- The **build environment is Cloudflare's**, not a GitHub runner. It must
|
||||
match `.nvmrc` (Node 26 since 2026-10-23 — downloaded per build, the image
|
||||
preinstalls 22 and 24) and `packageManager` (pnpm 11), or the deployed
|
||||
output can differ from what CI validated. CI runs the same `pnpm build`
|
||||
composite, so the gates are identical; verify after any toolchain bump
|
||||
(docs/13 §2). Node 25+ ships no Corepack — if a build ever cannot find
|
||||
pnpm, set the Workers Builds variable `PNPM_VERSION=11.15.1`.
|
||||
- `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_ACCOUNT_ID` repo secrets (action item
|
||||
H3) are **no longer used by any workflow**. They can be deleted, and should
|
||||
be if nothing else claims them — an unused deploy credential is pure risk.
|
||||
- A local `wrangler deploy` still works for the maintainer and is the fastest
|
||||
way to ship a hotfix, but it bypasses `ci`. Prefer pushing.
|
||||
H3) were **deleted** — not present on 2026-10-23, when the repository's
|
||||
Actions secrets were `DISCORD_RELEASES_WEBHOOK`, `SONAR_TOKEN` and
|
||||
`VT_API_KEY`. No workflow deploys.
|
||||
- A local `pnpm deploy` (build + `wrangler deploy`) still works for the
|
||||
maintainer, but it bypasses `ci` — and **must never run while Workers
|
||||
Builds builds are queued**: a queued older build would land after it and
|
||||
roll production back. Prefer merging.
|
||||
|
||||
Everything else uses the default `GITHUB_TOKEN` with **explicit least
|
||||
`permissions:` blocks in every caller** — the Phase-5 lesson: a caller stub
|
||||
`permissions:` blocks in every workflow** — the repository's default
|
||||
workflow token is read-WRITE (Settings → Actions → Workflow permissions), so
|
||||
a workflow without the block would get far more than it needs. Workflows
|
||||
declare `contents: read` at the top and grant more per job only where
|
||||
needed (quarantine). Checkouts use `persist-credentials: false`. The
|
||||
Phase-5 lesson still applies to callers of reusable workflows: a caller stub
|
||||
without its own `permissions:` block silently defaults to `none` and the
|
||||
reusable workflow fails.
|
||||
|
||||
@@ -51,22 +74,31 @@ Pages-deploy job (`pages: write`, `id-token: write`) even with
|
||||
`deploy-pages: false`. When a caller dies at startup, read the *reusable*
|
||||
workflow's job-level `permissions:` blocks first.
|
||||
|
||||
**`CLOUDFLARE_API_TOKEN` needs zone scopes, not just Workers.** The "Edit
|
||||
Cloudflare Workers" template alone fails with `Authentication error
|
||||
[code: 10000]` on `/zones/…/workers/routes` as soon as `wrangler.jsonc`
|
||||
declares a `custom_domain`. Add **Zone → Workers Routes → Edit** and
|
||||
**Zone → DNS → Edit**. A local `wrangler deploy` will not reveal this: local
|
||||
wrangler uses OAuth with full rights, so CI is the only place the gap shows.
|
||||
**`CLOUDFLARE_API_TOKEN` needs zone scopes, not just Workers** (moot while
|
||||
no workflow deploys — kept for the day one does). The "Edit Cloudflare
|
||||
Workers" template alone fails with `Authentication error [code: 10000]` on
|
||||
`/zones/…/workers/routes` whenever `wrangler.jsonc` declares a
|
||||
`custom_domain`. Add **Zone → Workers Routes → Edit** and **Zone → DNS →
|
||||
Edit**. A local `wrangler deploy` will not reveal this: local wrangler uses
|
||||
OAuth with full rights, so CI is the only place the gap shows.
|
||||
|
||||
All third-party actions **in this repository's own workflows** are pinned to
|
||||
commit SHAs (`@<sha> # vX.Y.Z` comment); Renovate maintains the pins. The rule
|
||||
is scoped deliberately: the `poli0981/.github` reusable workflows pin their
|
||||
internal actions by **major tag** (`actions/checkout@v7`, `setup-node@v6`), and
|
||||
that is the ops repo's call, not ours — do not file it as a defect here.
|
||||
full commit SHAs with the release in a comment (`@<sha> # vX.Y.Z`,
|
||||
SonarCloud `githubactions:S7637`); Dependabot's `github-actions` ecosystem
|
||||
bumps the SHA and the comment together (§6). The rule is scoped
|
||||
deliberately: first-party org workflows (`poli0981/.github`) are tracked at
|
||||
`@main` so org-wide fixes land everywhere at once, and how *they* pin their
|
||||
internal actions is the ops repo's call — do not file it as a defect here.
|
||||
|
||||
**Action major versions** below reflect the ops repo's verified-2026-07-06
|
||||
baseline: `checkout@v7`, `setup-node@v6`, `pnpm/action-setup@v6`. Confirm the
|
||||
current majors when the pins are first resolved to SHAs.
|
||||
Pinned as of 2026-10-23: `actions/checkout` v7.0.1 · `pnpm/action-setup`
|
||||
v6.1.0 (no `version:` — it reads `packageManager`) · `actions/setup-node`
|
||||
v7.1.0 (`node-version-file: .nvmrc`) · `actions/cache` v6.1.0 ·
|
||||
`actions/upload-artifact` v7.0.2 · `google/osv-scanner-action` v2.7.0 ·
|
||||
`lycheeverse/lychee-action` v2.9.0 · `peter-evans/create-pull-request`
|
||||
v8.1.1 · `SonarSource/sonarqube-scan-action` v8.3.0 (with
|
||||
`scannerVersion: 8.2.0.6438`, the newest CLI — Dependabot bumps the action,
|
||||
not that input; the deprecated `sonarcloud-github-action` must not come
|
||||
back).
|
||||
|
||||
## 2. Callers to `poli0981/.github` reusable workflows
|
||||
|
||||
@@ -78,7 +110,7 @@ current majors when the pins are first resolved to SHAs.
|
||||
> would have failed on the first CI run. Re-check the listing before adding
|
||||
> any new caller.
|
||||
|
||||
`.github/workflows/ci.yml` — **self-contained, two jobs (`build`, `gates`).**
|
||||
`.github/workflows/ci.yml` — **self-contained, three jobs (`build`, `gates`, `sonar`).**
|
||||
|
||||
It is deliberately NOT a caller. An earlier version delegated to
|
||||
`reusable-web-react.yml` and every run ended in `startup_failure`, for two
|
||||
@@ -96,18 +128,52 @@ independent reasons:
|
||||
matching nothing, an unregistered service worker, CSP-dropped inline
|
||||
styles). A quietly-skipping CI is the wrong tool here.
|
||||
|
||||
The duplicated "logic" is six `pnpm` invocations — a fair price for a gate that
|
||||
fails loudly. Jobs:
|
||||
The duplicated "logic" is a handful of `pnpm` invocations — a fair price for a
|
||||
gate that fails loudly. Triggers: `pull_request`, `push` to `main`, and
|
||||
`workflow_dispatch` (so `quarantine.yml` can run the required checks on the
|
||||
PR it opens — §4). Top-level `permissions: contents: read`; concurrency
|
||||
cancels superseded runs except on `main`. Jobs:
|
||||
|
||||
- **`build`** — `pnpm lint`, `check`, `test`, `build`, then **`check:styles`**
|
||||
(must run after `build`; it inspects `dist/`) and `knip`.
|
||||
- **`gates`** — `validate:data`, `i18n:check`, `osv-scanner`, `pnpm audit
|
||||
--prod`, and on PRs the changed-files lychee sweep.
|
||||
- **`build`** (25 min cap) — install (frozen lockfile) → `pnpm lint`
|
||||
(ESLint + Prettier) → `pnpm check` (types) → **`pnpm coverage`** (the unit
|
||||
run itself, failing below the thresholds in `vitest.config.ts`) →
|
||||
**`pnpm build`** — the *same* command Workers Builds runs, carrying its own
|
||||
gates: `validate:data → i18n:check → astro build → postbuild:html →
|
||||
check:csp → check:assets → check:sw → check:feed` → **`wrangler deploy
|
||||
--dry-run`** (bundles `worker/` and validates `wrangler.jsonc` — bindings,
|
||||
assets, `run_worker_first` — without credentials) → `pnpm knip` →
|
||||
**Playwright e2e** on that build (docs/11 §5): the Chromium download is
|
||||
cached per Playwright version (on a hit only the OS libraries are
|
||||
installed), and the HTML report is uploaded as an artifact (7 days) when
|
||||
the job fails.
|
||||
- **`gates`** (15 min cap) — `validate:data`, `i18n:check`, `osv-scanner`
|
||||
(lockfile mode), `pnpm audit --prod`, and on PRs the changed-files lychee
|
||||
sweep (§5).
|
||||
- **`sonar`** (20 min cap, **not** a required check — a SonarQube Cloud outage
|
||||
must never block a merge) — CI-based analysis since 2026-10-23, replacing
|
||||
Automatic Analysis (which cannot import coverage, and which must stay off:
|
||||
a CI scan fails while it is on). Full-history checkout (blame and the
|
||||
new-code period need it) → install → `pnpm coverage` →
|
||||
`SonarSource/sonarqube-scan-action` with `scannerVersion` pinned to the
|
||||
newest SonarScanner CLI, `-Dsonar.projectVersion=<package.json version>`
|
||||
(the project's new-code period is "previous version", so new code on
|
||||
`main` is everything since the last release) and
|
||||
`-Dsonar.qualitygate.wait=true`, so a failed **Sonar way** gate turns the
|
||||
job red. Scope lives in `sonar-project.properties` (organization
|
||||
`poli0981`, project `poli0981_softharbor`): sources rooted at the repo so
|
||||
`.github/` workflows are analysed, the dataset/docs/build output excluded,
|
||||
tests (and `scripts/fixture.ts`) judged by test rules, coverage from
|
||||
`coverage/lcov.info` with only the root `*.config.*` files excluded
|
||||
(docs/11 §1). The job's `if:` reads **only** the `github` context — a
|
||||
`secrets` reference there invalidates the whole workflow, and the
|
||||
required `build`/`gates` would never appear — and skips runs that lack
|
||||
`SONAR_TOKEN`: Dependabot (separate secret store), fork PRs, and the bot
|
||||
data PRs (`workflow_dispatch`, or `github-actions[bot]`).
|
||||
|
||||
Two action references that do not work the obvious way: the OSV scanner lives
|
||||
in a **subdirectory** of its repo and publishes **no rolling major tag**, so it
|
||||
is `google/osv-scanner-action/osv-scanner-action@v2.3.8` — `@v2` does not
|
||||
resolve at all.
|
||||
is `google/osv-scanner-action/osv-scanner-action@<sha> # v2.7.0` — `@v2` does
|
||||
not resolve at all.
|
||||
|
||||
`.github/workflows/codeql.yml` — `reusable-codeql.yml` **does** exist (verified
|
||||
2026-07-27). Two things it is easy to get wrong, both fatal at startup:
|
||||
@@ -121,7 +187,9 @@ resolve at all.
|
||||
name: codeql
|
||||
on:
|
||||
push: { branches: [main] }
|
||||
pull_request: # REQUIRED — its check is a required status check
|
||||
schedule: [{ cron: '31 3 * * 1' }]
|
||||
workflow_dispatch: # quarantine.yml runs it on the PR it opens
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
@@ -133,7 +201,13 @@ jobs:
|
||||
with: { languages: '["javascript-typescript"]' }
|
||||
```
|
||||
|
||||
`.github/workflows/notify.yml` (tagged release → Discord announcement):
|
||||
`pull_request` is not optional: the ruleset lists `codeql / Analyze
|
||||
(javascript-typescript)` as a required check, and a required check the
|
||||
workflow never produces on a PR deadlocks the repository — no PR can merge
|
||||
(hit 2026-07-30). It is also the point of the tool: scanning only after the
|
||||
merge reports a vulnerability that is already on `main`.
|
||||
|
||||
`.github/workflows/notify.yml` (published release → Discord announcement):
|
||||
|
||||
```yaml
|
||||
name: notify
|
||||
@@ -141,15 +215,26 @@ on:
|
||||
release: { types: [published] }
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag: { required: true, type: string }
|
||||
tag: { description: Release tag to (re-)announce, required: true, type: string }
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
announce:
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@main
|
||||
secrets: inherit # DISCORD_RELEASES_WEBHOOK / _REPO_WEBHOOK / _PING_ROLE_ID
|
||||
with:
|
||||
# The reusable workflow reads `tag_override`, falling back to the
|
||||
# release event's tag. Without it every manual re-run died with
|
||||
# "No release tag available."
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
```
|
||||
|
||||
Only the one secret the announcement needs is passed — not `secrets:
|
||||
inherit`, which would hand every repository secret to code tracked at
|
||||
`@main`. Publishing a release fires this, so release notes must be accurate
|
||||
before they are published (docs/13 §3).
|
||||
|
||||
**Scope note.** This fires once per *tagged release* and reaches **Discord
|
||||
only** — that is all `announce-release.yml` does. The multi-platform
|
||||
`notify.py` cross-poster (Telegram / Bluesky / Mastodon / X / Facebook) is
|
||||
@@ -164,15 +249,31 @@ Builds is connected to the GitHub repository and owns both:
|
||||
|
||||
| Trigger | What happens |
|
||||
|---|---|
|
||||
| push to `main` | Cloudflare builds and deploys to `softharbor.net` |
|
||||
| pull request | Cloudflare builds a preview and reports it on the PR |
|
||||
| push to `main` | Cloudflare queues a build (`pnpm run build`), then deploys (`npx wrangler deploy`) to `softharbor.net` — assets **and** the `/api/verify` Worker |
|
||||
| pull request push | Cloudflare builds a preview version (`wrangler versions upload`) and reports its URL on the PR |
|
||||
|
||||
**Builds are serialized.** One build at a time across PRs and `main`; a
|
||||
`main` merge after a burst of PR pushes can wait ~20 minutes, and a
|
||||
superseded queued `main` build can be skipped (only the newest lands). The
|
||||
"Workers Builds" check (check run `Workers Builds: softharbor`) appears on a
|
||||
`main` commit only once its build starts — an absent check means "queued",
|
||||
and a quiet stretch in `wrangler deployments list --name softharbor` only
|
||||
means nothing reached `main`.
|
||||
|
||||
**After every merge** (release step, docs/13 §3): wait until the merge
|
||||
commit's "Workers Builds" check is green, then verify production — new
|
||||
`/_astro/` asset hashes served, the response headers, `/api/verify`
|
||||
answering JSON from the Worker, `/rss.xml`. **Never run `wrangler deploy` by
|
||||
hand while builds are queued**: the queued older build would land after it.
|
||||
|
||||
Rollback stays where it was: dashboard → the Worker → **Deployments** → promote
|
||||
a previous version, or `wrangler rollback` locally.
|
||||
a previous version, or `wrangler rollback` locally (same caution about a
|
||||
queue).
|
||||
|
||||
Preview URLs remain unlisted, short-lived and carry no sitemap; the indexing
|
||||
risk is accepted, and a static `_headers` file cannot vary `X-Robots-Tag` by
|
||||
host (docs/16 §3). Never link one publicly.
|
||||
Preview URLs remain unlisted, short-lived and carry no sitemap, and since
|
||||
v1.1 `_headers` marks them `X-Robots-Tag: noindex` with an absolute-URL host
|
||||
pattern (`https://:version.:subdomain.workers.dev/*`) that the production
|
||||
domain never matches (docs/16 §3). Never link one publicly.
|
||||
|
||||
**Do not re-add a `deploy.yml`.** Two pipelines racing on the same Worker is
|
||||
worse than either alone, and the token a workflow would need carries zone-level
|
||||
@@ -189,47 +290,128 @@ on:
|
||||
schedule: [{ cron: '17 2 * * *' }]
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
concurrency: { group: quarantine, cancel-in-progress: false }
|
||||
jobs:
|
||||
sweep:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # create-pull-request commits to quarantine/auto
|
||||
pull-requests: write # …and opens the PR
|
||||
issues: write # one tracking issue per slug
|
||||
actions: write # dispatch the required checks onto the PR branch
|
||||
steps:
|
||||
- uses: actions/checkout@<pinned-sha> # v4
|
||||
- uses: actions/setup-node@<pinned-sha> # v4
|
||||
with: { node-version: 24 }
|
||||
- uses: actions/checkout@<sha> # v7.0.1
|
||||
with: { persist-credentials: false } # no token while repo code runs
|
||||
- uses: actions/setup-node@<sha> # v7.1.0
|
||||
with: { node-version-file: .nvmrc }
|
||||
- id: sweep
|
||||
run: node scripts/quarantine.mjs # moves flagged files, writes summary
|
||||
- if: steps.sweep.outputs.moved != ''
|
||||
uses: peter-evans/create-pull-request@<pinned-sha> # v7
|
||||
run: node scripts/quarantine.mjs # moves flagged files, writes `moved`
|
||||
- id: cpr
|
||||
if: steps.sweep.outputs.moved != ''
|
||||
uses: peter-evans/create-pull-request@<sha> # v8.1.1
|
||||
with:
|
||||
branch: quarantine/auto
|
||||
sign-commits: true # the ruleset requires signed commits
|
||||
title: 'data: quarantine flagged entries'
|
||||
commit-message: 'data: quarantine ${{ steps.sweep.outputs.moved }}'
|
||||
labels: security, quarantine
|
||||
body: |
|
||||
Automated sweep: entries with `security.status: "flagged"` moved
|
||||
to `data/quarantine/`. Evidence & discussion in the linked issue.
|
||||
- if: steps.cpr.outputs.pull-request-branch != ''
|
||||
env: { GH_TOKEN: '${{ github.token }}', BRANCH: '${{ steps.cpr.outputs.pull-request-branch }}' }
|
||||
run: | # a GITHUB_TOKEN PR's own runs wait for approval
|
||||
gh workflow run ci.yml --ref "$BRANCH"
|
||||
gh workflow run codeql.yml --ref "$BRANCH"
|
||||
- if: steps.sweep.outputs.moved != ''
|
||||
uses: actions/github-script@<pinned-sha> # v7
|
||||
with:
|
||||
script: | # open one tracking issue per moved slug (title: [quarantine] <slug>)
|
||||
…
|
||||
env: { GH_TOKEN: '${{ github.token }}', MOVED: '${{ steps.sweep.outputs.moved }}' }
|
||||
run: … # per slug (validated against the slug regex): open
|
||||
# "[quarantine] <slug>" only if no such issue is open
|
||||
```
|
||||
|
||||
`scripts/quarantine.mjs`: scans `src/data/apps/*.json`, for each
|
||||
`status === 'flagged'` performs `git mv` to `data/quarantine/`, emits
|
||||
`moved` output (space-separated slugs). Idempotent; exits 0 when nothing to
|
||||
do. The PR (not direct push) keeps a human in the loop on `main` while the
|
||||
nightly cron guarantees a flagged entry never survives more than 24 h even
|
||||
if a PR reviewer missed it.
|
||||
`scripts/quarantine.mjs` (also `pnpm quarantine`, for the maintainer): scans
|
||||
`src/data/apps/*.json`, and for each `status === 'flagged'` **moves** the
|
||||
file to `data/quarantine/` (a plain filesystem rename — git records it as a
|
||||
rename when committed; the directory is created on first use). It skips
|
||||
unparseable files (L1/L2's job), refuses a non-slug filename (it would reach
|
||||
a workflow output, a commit message and an issue title) and never
|
||||
overwrites an existing quarantined copy. Emits the `moved` output
|
||||
(space-separated slugs). Idempotent; exits 0 when nothing is flagged. The
|
||||
PR (not a direct push) keeps a human in the loop on `main` while the nightly
|
||||
cron guarantees a flagged entry never survives more than 24 h even if a PR
|
||||
reviewer missed it. Normally it never fires: `validate:data` fails a PR
|
||||
that flags an entry without moving it.
|
||||
|
||||
**Repo setting required (action item H10).** `peter-evans/create-pull-request`
|
||||
fails — even with the correct `permissions:` block — unless *Settings → Actions
|
||||
→ General → **Allow GitHub Actions to create and approve pull requests*** is
|
||||
enabled. Without it the nightly sweep silently cannot open its PR, which
|
||||
defeats hard rule 5.
|
||||
Hardened 2026-10-21: a PR opened with `GITHUB_TOKEN` triggered no
|
||||
`pull_request` workflows, so its required checks never ran and it could not
|
||||
merge — the job now dispatches `ci.yml` and `codeql.yml` on the PR branch
|
||||
(`workflow_dispatch` always runs). *Corrected 2026-10-23:* since GitHub's
|
||||
2026-06-11 change such a PR **does** get `pull_request` runs, but they wait
|
||||
for a maintainer's approval — the dispatch stays, and approving those runs
|
||||
would only duplicate CI. The commit is **signed**
|
||||
via the API (`sign-commits`). Issues are created only when none is open
|
||||
(every nightly run used to re-open them). Step outputs reach shell bodies
|
||||
only through `env:`, never `${{ }}` inside `run:` (expression injection).
|
||||
|
||||
**Repo setting required (action item H10 — enabled).**
|
||||
`peter-evans/create-pull-request` fails — even with the correct
|
||||
`permissions:` block — unless *Settings → Actions → General → **Allow GitHub
|
||||
Actions to create and approve pull requests*** is enabled. Without it the
|
||||
nightly sweep silently cannot open its PR, which defeats hard rule 5.
|
||||
|
||||
## 4b. VirusTotal re-check (repo-local)
|
||||
|
||||
`.github/workflows/vt-recheck.yml` + `scripts/vt-recheck.mjs` (added
|
||||
2026-10-23, D30) — docs/09 §6 step 5 made assisted, so no dated security
|
||||
claim can go stale unnoticed. Every check in the v1.0 catalogue was dated
|
||||
2026-07-30, so all 326 would have crossed `validate:data`'s 180-day warning
|
||||
together on 2027-01-27.
|
||||
|
||||
- **What it scans:** each entry's `links.download` page — the URL every
|
||||
recorded scan was of (318 of 326 evidence ids equal the SHA-256 of that
|
||||
link's canonical form; 8 had drifted to a newer link). `POST /urls`
|
||||
submits it, a second pass reads `GET /analyses/{id}`, and the permalink is
|
||||
`https://www.virustotal.com/gui/url/<sha256>`. The canonical form keeps a
|
||||
`#fragment`: the API puts it in the id (measured 2026-10-23), while the six
|
||||
2026-07-30 scans of `#download` links were submitted from a browser, which
|
||||
never sends one — those six count as drifted until their next scan.
|
||||
- **What it writes:** only the three `security` lines, patched in place so
|
||||
Prettier's layout survives; never `addedAt`/`updatedAt` — the feed orders
|
||||
by `addedAt`, and notify.py announces anything it has not seen.
|
||||
- **The rules:** zero malicious/suspicious ⇒ fresh `evidence` + `checkedAt`,
|
||||
status unchanged; any detection ⇒ `clean` becomes `unverified` and a
|
||||
`[vt] <slug>` issue (label `security`) asks the maintainer to decide;
|
||||
`promote` slugs go `unverified` → `clean` only on a clean scan. It never
|
||||
sets `flagged` — quarantine stays a human `pnpm quarantine` (§4). An
|
||||
analysis in which no engine answered is "not checked", not clean.
|
||||
- **Who is due:** the `slugs` input first, then never-scanned entries, then
|
||||
drifted evidence (at most weekly), then checks older than `max_age`
|
||||
(default 90 days), oldest first.
|
||||
- **Limits:** the Public API allows 4 requests a minute and 500 a day, and
|
||||
counts every call. The script paces at 15.5 s, spends at most `budget`
|
||||
(default 440, capped at 500) with no more than half of it on submissions,
|
||||
backs off 60 s once on a 429 and treats a second as the day's quota —
|
||||
keeping what it finished. A refused key fails the step; a missing key
|
||||
(forks, Dependabot) is a no-op that says so. `concurrency: vt-recheck`
|
||||
keeps two runs off one key. The schedule, 00:41 UTC, follows the daily
|
||||
quota reset.
|
||||
- **On `main` (daily cron, or dispatch):** one PR, `vt/recheck`, opened by
|
||||
`peter-evans/create-pull-request` with `add-paths: src/data/apps` and
|
||||
API-signed commits. While it is open, each run first **carries** its
|
||||
results (`git archive` of the branch into `$RUNNER_TEMP`; a block is
|
||||
adopted only if its download link is unchanged and its check is newer), so
|
||||
the PR accumulates day by day instead of re-scanning the same entries. The
|
||||
repository deletes merged branches, and a PR closed unmerged is never
|
||||
carried. CI is dispatched on the branch when the action created or updated
|
||||
the PR (same reason as §4).
|
||||
- **On any other branch (preview):** dispatch `vt-recheck.yml --ref
|
||||
<branch>` and it scans only the `slugs` given — or, with none, the entries
|
||||
without a scan, i.e. a data PR's new apps — then uploads the patched files
|
||||
and the report as the `vt-preview` artifact (7 days). No PR, no issues: the
|
||||
maintainer reviews and commits them into the data PR before it merges.
|
||||
- **Terms:** VirusTotal offers the Public API to sites "free to consumers";
|
||||
it "must not be used in business workflows that do not contribute new
|
||||
files" and "can not be used as a substitute for antivirus products".
|
||||
SoftHarbor is free, carries no ads and only submits public download URLs;
|
||||
the site copy keeps making no safety claim (hard rule 4).
|
||||
|
||||
## 5. Link check (repo-local)
|
||||
|
||||
@@ -243,46 +425,84 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
concurrency: { group: link-check, cancel-in-progress: false }
|
||||
jobs:
|
||||
lychee:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@<pinned-sha> # v7
|
||||
- run: node scripts/extract-urls.mjs > /tmp/urls.txt # all links.* from data
|
||||
- uses: lycheeverse/lychee-action@<pinned-sha> # v2
|
||||
- uses: actions/checkout@<sha> # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@<sha> # v7.1.0
|
||||
with: { node-version-file: .nvmrc }
|
||||
- run: node scripts/extract-urls.mjs > /tmp/urls.txt # links.* + evidence
|
||||
- id: lychee
|
||||
uses: lycheeverse/lychee-action@<sha> # v2.9.0
|
||||
with:
|
||||
args: --max-concurrency 4 --retry-wait-time 2 /tmp/urls.txt
|
||||
fail: false
|
||||
- uses: peter-evans/create-issue-from-file@<pinned-sha> # v5
|
||||
if: env.lychee_exit_code != 0
|
||||
with: { title: 'link-check: broken official links', path: ./lychee/out.md, labels: 'link-rot' }
|
||||
args: >-
|
||||
--max-concurrency 4 --retry-wait-time 10 --max-retries 5 --timeout 45
|
||||
--accept '200..=299,403,429'
|
||||
/tmp/urls.txt
|
||||
output: ./lychee/out.md
|
||||
fail: false # link rot is triage, not a build break
|
||||
- name: Refresh the tracking issue
|
||||
run: … # gh: edit + comment on the ONE open "link-check: broken
|
||||
# official links" issue (label link-rot), or create it;
|
||||
# close it the first week the sweep is clean
|
||||
```
|
||||
|
||||
PR-time link checking covers only files changed in the PR. It runs as the last
|
||||
two steps of `ci.yml`'s **`gates` job** (§2) — *not* inside the reusable-workflow
|
||||
call, which cannot accept extra steps. The weekly job above owns the full sweep.
|
||||
**One tracking issue, not one per week.** The previous version opened a
|
||||
fresh issue on every red run and left 12 duplicates open (#7–#20) — the
|
||||
latest for a single transient 502. Now the open issue's body is replaced
|
||||
with the new report and a comment links the run; a clean sweep closes it.
|
||||
Retries are longer than the PR sweep's because vendor sites blip and a
|
||||
weekly job has time to ride it out.
|
||||
|
||||
**403 and 429 count as reachable** in both sweeps (decision of 2026-07-30,
|
||||
docs/15 §4): 14 of the first 26 failures were bot mitigation on plainly
|
||||
live vendor sites. 404/5xx/connection failures still fail. Do **not** add
|
||||
`--user-agent`: spoofing a browser cleared the 403s but made other vendors
|
||||
answer 406/400.
|
||||
|
||||
PR-time link checking covers only the links the PR adds or edits — the URLs
|
||||
on the added lines of its diff. It runs as the last two steps of `ci.yml`'s
|
||||
**`gates` job** (§2): `git diff -U0` runs in the workflow under
|
||||
`set -euo pipefail` and pipes into `extract-urls.mjs --added` (a failed diff
|
||||
stops the job rather than silently narrowing the check), and lychee is
|
||||
**skipped** when there is nothing to check — an empty input is a
|
||||
configuration error to lychee, and a skipped step stays visible where a
|
||||
green "0 links" would not. A new entry is all added lines, so every one of
|
||||
its links is checked; a re-check PR adds only evidence URLs. *Changed
|
||||
2026-10-23:* it used to check every link of every touched file
|
||||
(`--changed`), and the first `vt/recheck` PR — 198 rewritten security
|
||||
blocks — failed three times on ~700 unrelated vendor links (a timeout at
|
||||
gitlab.linphone.org, a 522 at godotengine.org, a 520 at activitywatch.net).
|
||||
|
||||
## 6. Dependency & scanning automation
|
||||
|
||||
`renovate.json`:
|
||||
**Dependabot** — `.github/dependabot.yml`. It replaced `renovate.json` on
|
||||
2026-10-21: Renovate was never installed on this repository (no
|
||||
`renovate/*` branch, Dependency Dashboard or PR ever appeared), so for three
|
||||
months nothing kept versions or action pins current, while Dependabot
|
||||
*security* updates — already enabled in Settings — quietly failed on
|
||||
transitive packages. One bot, configured here, instead of two.
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:best-practices", ":pinAllExceptPeerDependencies",
|
||||
"helpers:pinGitHubActionDigests"],
|
||||
"schedule": ["before 6am on monday"],
|
||||
"packageRules": [
|
||||
{ "groupName": "minor+patch", "matchUpdateTypes": ["minor", "patch"] },
|
||||
{ "matchUpdateTypes": ["major"], "dependencyDashboardApproval": true }
|
||||
]
|
||||
}
|
||||
```
|
||||
| Ecosystem | Schedule | Policy |
|
||||
|---|---|---|
|
||||
| `npm` | weekly, Monday 05:00 Asia/Ho_Chi_Minh | **2-day cooldown**; `minor` + `patch` grouped (`minor-and-patch`); up to 10 open PRs; `versioning-strategy: increase`; **ignores the majors of `typescript` and `@typescript/native`** (D21 as amended — the TS 6 API wrapper and TS 7 run side by side; how Dependabot treats `npm:` aliases is ⚠ unverified) and **`@types/node` majors** (the typings track the Node major in `.nvmrc`, docs/01 §5 rule 4); commit prefixes `fix(deps)` / `chore(deps)` (dev) |
|
||||
| `github-actions` | same | 2-day cooldown; all actions in one group; bumps the pinned SHA and its `# vX.Y.Z` comment together; prefix `ci` |
|
||||
|
||||
**Why the cooldown:** pnpm 11 refuses any release younger than its default
|
||||
24 h `minimumReleaseAge`, and CI installs with `--frozen-lockfile` under that
|
||||
policy — a PR opened on release day failed before a single test ran (#14,
|
||||
#15). Two days keeps every update PR installable.
|
||||
|
||||
Plus `osv-scanner` (`google/osv-scanner-action`, lockfile mode) and
|
||||
`pnpm audit --prod`, both as steps of `ci.yml`'s **`gates` job** (§2) — again,
|
||||
not inside the reusable-workflow call. Critical findings fail the PR
|
||||
(policy docs/01 §5).
|
||||
`pnpm audit --prod`, both steps of `ci.yml`'s **`gates` job** (§2), on every
|
||||
PR and push to `main`; a finding fails the job (policy docs/01 §5).
|
||||
CodeQL (§2) and SonarQube Cloud's CI-based analysis (`ci.yml` `sonar` job,
|
||||
`sonar-project.properties` — sources rooted at the repo so `.github/`
|
||||
workflows are analysed too; the dataset, docs and build output excluded;
|
||||
coverage imported) complete the scanning.
|
||||
|
||||
## 7. Issue forms
|
||||
|
||||
@@ -324,7 +544,9 @@ body:
|
||||
validations: { required: true }
|
||||
- type: input
|
||||
id: homepage
|
||||
attributes: { label: Official homepage (https) }
|
||||
attributes:
|
||||
label: Official homepage (https)
|
||||
description: The developer's own domain or official repository — not a download portal.
|
||||
validations: { required: true }
|
||||
- type: dropdown
|
||||
id: pricing
|
||||
@@ -345,15 +567,36 @@ body:
|
||||
- { label: 'Actively maintained or stable-and-finished', required: true }
|
||||
```
|
||||
|
||||
`.github/ISSUE_TEMPLATE/config.yml`: `blank_issues_enabled: false`, contact
|
||||
link → Discussions (or the gaming Discord) for general questions.
|
||||
`.github/ISSUE_TEMPLATE/config.yml`: `blank_issues_enabled: false`; contact
|
||||
links → GitHub Discussions for questions, and **Report a security issue** →
|
||||
the repository's private vulnerability reporting
|
||||
(`/security/advisories/new`) — never a public issue.
|
||||
|
||||
## 8. Branch protection (repo settings — H1 follow-up)
|
||||
## 8. Branch protection (ruleset "Run" on `main`)
|
||||
|
||||
`main`: require PR, require linear history, dismiss stale approvals on push.
|
||||
Required status checks — name **both** `ci` jobs, not the workflow: `ci / build`,
|
||||
`ci / gates`, plus `codeql`. Naming only the workflow leaves the `gates` job
|
||||
(validate:data, i18n parity, osv-scanner, link check) unenforced.
|
||||
`main` is protected by a repository **ruleset** ("Run"), not classic branch
|
||||
protection:
|
||||
|
||||
CODEOWNERS: `* @poli0981` with explicit entries for `.github/**`, `scripts/**`,
|
||||
`src/data/**` (T6).
|
||||
- **PR required**; **0 required approvals** and code-owner review off
|
||||
(single-maintainer repository — CODEOWNERS only *requests* the review).
|
||||
- **Signed commits required.** Commits are GPG-signed locally; the
|
||||
quarantine bot signs through the API (§4).
|
||||
- **Linear history.**
|
||||
- **Required status checks:** `build` and `gates` — the two `ci.yml` jobs,
|
||||
shown in the UI as `ci / build`, `ci / gates` — and
|
||||
`codeql / Analyze (javascript-typescript)`. Name **both** `ci` jobs, not
|
||||
the workflow: naming only the workflow leaves the `gates` job
|
||||
(validate:data, i18n parity, osv-scanner, audit, link check) unenforced.
|
||||
A required check must be produced on PRs, or nothing can merge (§2).
|
||||
- Auto-merge is disabled (⚠ verify in Settings if this matters).
|
||||
|
||||
**Merge method: squash, and only squash.** GitHub refuses a rebase merge
|
||||
under the signed-commits rule ("Rebase merges cannot be automatically signed
|
||||
by GitHub"), and a merge commit breaks linear history. The squash title must
|
||||
be a valid conventional commit, and the body should carry every commit
|
||||
subject from the branch (docs/10 §5). Older history shows rebase merges only
|
||||
because they predate the signature rule. A branch stacked on a squashed one
|
||||
must be replayed with `git rebase --onto origin/main <old-branch>`.
|
||||
|
||||
CODEOWNERS: `* @poli0981` with explicit entries for `/.github/**`,
|
||||
`/scripts/**`, `/src/data/**` and `/worker/**` (T6).
|
||||
+139
-52
@@ -3,24 +3,34 @@
|
||||
## 1. Versioning model
|
||||
|
||||
The **site** deploys continuously from `main` — no version numbers on
|
||||
content. Git tags mark milestones only: `v1.0.0` at public launch, minor
|
||||
tags when a feature phase ships (they trigger `notify.yml`). Data changes
|
||||
never tag. `CHANGELOG.md` (Keep-a-Changelog) records feature work, not app
|
||||
additions — the RSS feed *is* the data changelog.
|
||||
content. Git tags mark milestones only: **`v1.0.0`** at public launch
|
||||
(tagged and released 2026-07-30), **`v1.1.0`** for the post-launch review
|
||||
(tagged and released 2026-10-21; `package.json` `version` follows the tag),
|
||||
**`v1.2.0`** for the upkeep release — re-check automation, Node 26 /
|
||||
TypeScript 7, CI-based SonarQube Cloud, catalogue batch 2 (2026-10-23),
|
||||
minor tags when a feature phase ships. Publishing a GitHub Release fires `notify.yml` →
|
||||
Discord (docs/12 §2). Data changes never tag. `CHANGELOG.md`
|
||||
(Keep-a-Changelog, dates UTC) records feature work and anything a visitor
|
||||
should know — v1.1.0 leads with the privacy changes — not app additions:
|
||||
the RSS feed *is* the data changelog.
|
||||
|
||||
## 2. Launch checklist (gate for calling it v1.0.0)
|
||||
|
||||
> **Status 2026-07-28.** The infra section below is **green** — verified
|
||||
> against production after the M6 deploy: `http→https` 301, `www→apex` 301 with
|
||||
> path and query preserved, apex 200, branded 404, HSTS present, no
|
||||
> `X-Robots-Tag`, workers.dev route dead (404), DMARC resolving, and
|
||||
> `/api/apps.json`, `/rss.xml`, `/sitemap-index.xml`, `security.txt` all 200.
|
||||
> **Status 2026-10-21.** **v1.0.0 shipped on 2026-07-30** (tag + GitHub
|
||||
> Release) once the content blocker below cleared: 326 apps, 320 `clean` and
|
||||
> 6 held at `unverified`, every one with its scan linked. **v1.1.0**, the
|
||||
> post-launch review (CHANGELOG.md), was released on 2026-10-21; its last
|
||||
> merge (#25) is deployed (checked in production the same day). Unchecked
|
||||
> boxes below are still open, not forgotten; items added for v1.1 are
|
||||
> marked *(v1.1)*.
|
||||
>
|
||||
> **What still blocks v1.0.0 is content, not infrastructure:** the dataset
|
||||
> holds 5 entries against the 32 in §4, and every one is
|
||||
> `security.status: "unverified"` because the §6 vetting checklist has not been
|
||||
> run against them. Tagging v1.0.0 before that would put the project's own
|
||||
> honesty claim (hard rule 4) on a dataset nobody has checked.
|
||||
> **Status 2026-07-28** (kept for the record). The infra section below was
|
||||
> **green** — verified against production after the M6 deploy: `http→https`
|
||||
> 301, `www→apex` 301 with path and query preserved, apex 200, branded 404,
|
||||
> HSTS present, no `X-Robots-Tag`, workers.dev route dead (404), DMARC
|
||||
> resolving, and `/api/apps.json`, `/rss.xml`, `/sitemap-index.xml`,
|
||||
> `security.txt` all 200. What blocked v1.0.0 then was content: 5 entries,
|
||||
> all `unverified`.
|
||||
|
||||
Infra & correctness
|
||||
|
||||
@@ -28,28 +38,48 @@ Infra & correctness
|
||||
- [ ] `pnpm build` clean; validate:data clean; i18n parity clean
|
||||
- [ ] `curl -I` shows full header set (docs/09 §4); observatory scan grade A
|
||||
- [ ] `/apps/nonexistent` → HTTP 404 branded page; airplane-mode → offline page
|
||||
- [ ] `/api/apps.json`, `/rss.xml`, `/sitemap-index.xml` valid (W3C feed validator)
|
||||
- [ ] **PWA icons exist** — `public/icons/` 192, 512 and maskable PNGs, wired
|
||||
into the manifest. `favicon.svg` is a placeholder anchor mark and the
|
||||
manifest ships `icons: []` until the real wordmark lands (docs/06 §4),
|
||||
so there is currently no install prompt.
|
||||
- [ ] `security.txt` `Expires` is in the future (annual task, §6)
|
||||
- [ ] `/api/apps.json`, `/rss.xml`, `/sitemap-index.xml` valid (W3C feed
|
||||
validator). Since v1.1 `check:feed` asserts the emitted feed's guids,
|
||||
links and order on every build (docs/05 §A4).
|
||||
- [x] **PWA icons exist** *(v1.1)* — `public/icons/` 192, 512 and maskable
|
||||
512 PNGs plus `apple-touch-icon.png` and `favicon.ico`, generated by
|
||||
`pnpm icons`; the manifest lists them and `Base.astro` links it, so
|
||||
the site is installable (docs/08 Part D).
|
||||
- [x] `security.txt` `Expires` is in the future — 2027-07-28 (annual task, §6)
|
||||
- [ ] Domain package verified end-to-end (docs/16 §10 command block):
|
||||
DNSSEC signing, `www` → 301 apex with path+query, http → https,
|
||||
workers.dev main route dead, HSTS phase P1 header present,
|
||||
DMARC record resolves, `contact@softharbor.net` receives a test mail
|
||||
workers.dev main route dead, HSTS header present (P3 observed
|
||||
2026-10-21), DMARC record resolves, and *(v1.1)* a test mail to the
|
||||
`@poli0981.dev` purpose addresses arrives (D27 — the old
|
||||
`contact@softharbor.net` is retired)
|
||||
- [x] No stray `workers.dev` references in the repo. `git grep workers.dev`
|
||||
outside `docs/` and the lockfile should return only **`CLAUDE.md`'s
|
||||
hosting summary** — that and docs/16 §3 are deliberate descriptions of
|
||||
the disabled route, not live URLs. Anything else is a real stray.
|
||||
- [ ] **`X-Robots-Tag: noindex` removed from `public/_headers`.** It was added
|
||||
pre-launch so an empty site could be deployed without being indexed;
|
||||
leaving it in would silently keep the finished site out of every search
|
||||
engine. Verify with `curl -sI https://softharbor.net/ | grep -i robots`
|
||||
returning nothing.
|
||||
outside `docs/` and the lockfile should return only deliberate ones:
|
||||
`CLAUDE.md`'s hosting summary, the `wrangler.jsonc` comments, the
|
||||
`_headers` rule that marks PR previews `noindex`, and a Turnstile
|
||||
test fixture host. Anything else is a real stray.
|
||||
- [x] **`X-Robots-Tag: noindex` removed from `public/_headers`** (2026-07-28).
|
||||
It was added pre-launch so an empty site could be deployed without
|
||||
being indexed. Verify with `curl -sI https://softharbor.net/ | grep -i
|
||||
robots` returning nothing — only PR preview hosts carry it now.
|
||||
- [ ] Search Console **Domain property** for `softharbor.net` verified;
|
||||
sitemap `https://softharbor.net/sitemap-index.xml` submitted; Bing
|
||||
imported from GSC; Crawler Hints enabled (docs/16 §8)
|
||||
imported from GSC; Crawler Hints enabled (docs/16 §8). The
|
||||
`google-site-verification` TXT record is published (observed
|
||||
2026-10-21); the rest ⚠ verify.
|
||||
- [x] *(v1.1)* **Runtime secret `TURNSTILE_SECRET` set** on the production
|
||||
Worker (docs/08 Part E). A `POST /api/verify` with a junk token and a
|
||||
same-origin `Origin` must answer `403 {"error":"rejected"}`, not
|
||||
`503 {"error":"not_configured"}` — without the secret the gate fails
|
||||
open for everyone, silently. Verified 2026-10-21 (403 `rejected`,
|
||||
`no-store` JSON from the Worker). Re-check whenever the Worker is
|
||||
re-created.
|
||||
- [x] *(v1.1)* After the merge, the "Workers Builds" check on the merge
|
||||
commit is green **and** production has been verified (§3) — never
|
||||
assume a merge reached production. Done for #25 (2c40baf) on
|
||||
2026-10-21: `Workers Builds: softharbor`, `build`, `gates` and
|
||||
`codeql` green; production served `/contact`, the v1.1 CSP meta, a
|
||||
single immutable `Cache-Control` on hashed assets and `403 rejected`
|
||||
from `/api/verify`. Repeat on every merge (§6).
|
||||
|
||||
Content & legal
|
||||
|
||||
@@ -57,31 +87,81 @@ Content & legal
|
||||
with the scan permalink in `security.evidence`, zero `flagged`
|
||||
— **done 2026-07-30**: 320 `clean`, 6 held at `unverified`
|
||||
- [ ] Summaries proof-read in both locales (L4, docs/03 §2 — still open)
|
||||
- [ ] Legal drafts reviewed by Kokone (H6), contact email live (H5),
|
||||
`LEGAL_VERSION` set; gate tested on a fresh profile in both locales
|
||||
- [ ] LICENSE (GPL-3.0) + LICENSE-DATA.md present; footer license line correct
|
||||
- [ ] Legal text reviewed by Kokone — H6 approved the drafts on 2026-07-28;
|
||||
sign-off on the 2026-10-21 rewrite ⚠ verify. Contacts live (D27),
|
||||
`LEGAL_VERSION` = 2026-10-21 (docs/14 Part 2); gate — both steps —
|
||||
tested on a fresh profile in both locales (automated since v1.1 in
|
||||
`e2e/gate.spec.ts`; a manual pass on real hardware still worth doing)
|
||||
- [x] LICENSE (GPL-3.0) + LICENSE-DATA.md present; footer license line
|
||||
"Code GPL-3.0 · Data CC BY-SA 4.0" correct
|
||||
|
||||
Quality bar
|
||||
|
||||
- [ ] Lighthouse mobile on `/apps`: Performance ≥ 95 · A11y = 100 ·
|
||||
Best Practices = 100 · SEO = 100
|
||||
- [ ] JS on `/apps` < 80 KB gzip (docs/00 §2.5)
|
||||
- [x] JS on `/apps` < 80 KB gzip (docs/00 §2.5) — every first-party
|
||||
`/_astro/*.js` file *combined* is ~41 KB gzip (local build,
|
||||
2026-10-21), MiniSearch included; `/apps` loads a subset of that. The
|
||||
page's HTML is the heavier part (~119 KB gzip, docs/15 §2 item 9).
|
||||
- [ ] Both gates above are **enforced in CI**, not just checked once here —
|
||||
Lighthouse CI (assert A11y = 100) and a `size-limit` budget on the
|
||||
`/apps` bundle, wired into `ci.yml`'s `gates` job (docs/12 §2). A
|
||||
launch-day-only check is a number that starts regressing on day two.
|
||||
`/apps` bundle, wired into `ci.yml` (docs/12 §2). A launch-day-only
|
||||
check is a number that starts regressing on day two. *(v1.1: the
|
||||
Playwright suite now enforces axe — serious/critical findings in
|
||||
light and dark — console- and CSP-clean pages and no sideways
|
||||
overflow on every PR; Lighthouse and the size budget are still not
|
||||
wired.)*
|
||||
- [x] *(v1.1)* **End-to-end suite enforced in CI** — Playwright + axe on the
|
||||
built site, desktop + Pixel 7, in `ci.yml`'s `build` job on every PR
|
||||
and push to `main` (docs/11 §5); a red e2e run blocks the merge like
|
||||
any other required check.
|
||||
- [ ] VoiceOver (macOS) + NVDA (Windows) pass on grid, filter sheet, gate
|
||||
- [ ] Vietnamese diacritics visually clean in all three fonts at all scale
|
||||
steps (docs/06 §3)
|
||||
|
||||
## 3. Launch-day sequence
|
||||
## 3. Release sequence (every merge, every tagged release)
|
||||
|
||||
1. Merge the final seed PR → auto-deploy.
|
||||
2. Tag `v1.0.0`, publish GitHub Release (notes = feature summary EN) →
|
||||
`notify.yml` fires the cross-poster once for the launch itself.
|
||||
3. Manual posts where the cron doesn't reach (Discord announcement channels
|
||||
with role pings, pinned messages).
|
||||
4. Enable the RSS→notify.py cron for ongoing per-app announcements (§5).
|
||||
**After every merge to `main` — verify production, never assume it.**
|
||||
Workers Builds runs one build at a time; after a burst of PR pushes a
|
||||
`main` merge can wait about 20 minutes, and a superseded queued `main` build
|
||||
may be skipped (docs/12 §3).
|
||||
|
||||
1. **Wait** until the merge commit's **"Workers Builds" check is green**
|
||||
(check run `Workers Builds: softharbor`, beside `build`, `gates` and
|
||||
`codeql`). The check appears only once the build *starts* — no check
|
||||
yet means "queued", not "failed".
|
||||
2. **Then verify production itself:**
|
||||
- the new content-hashed `/_astro/` asset names are served (compare the
|
||||
page source with the local `dist/`), so the new build is live;
|
||||
- the headers: `curl -sI https://softharbor.net/` — header CSP exactly
|
||||
`frame-ancestors 'none'`, the security headers, HSTS; one hashed asset
|
||||
with a single `Cache-Control: public, max-age=31536000, immutable`;
|
||||
- the per-page CSP meta lists the two Cloudflare origins (docs/09 §4);
|
||||
- `/api/verify` is answered by the **Worker**:
|
||||
`curl -s -X POST -H 'Origin: https://softharbor.net' -H 'Content-Type:
|
||||
application/json' -d '{"token":"x"}' https://softharbor.net/api/verify`
|
||||
→ `403 {"error":"rejected"}` (a `503 not_configured` means the runtime
|
||||
secret is missing; a bare `405` from the asset server means the Worker
|
||||
is not deployed);
|
||||
- `/rss.xml` serves the expected items (guid = slug, docs/05 §A4).
|
||||
3. **Never run `wrangler deploy` by hand while builds are queued** — the
|
||||
queued older build would land after it and roll production back
|
||||
(docs/08 A3).
|
||||
|
||||
**Tagged release** (`v1.1.0` and later):
|
||||
|
||||
1. Merge (squash, signed — docs/12 §8), then complete the three steps above.
|
||||
2. Update `CHANGELOG.md` and `package.json` `version`; tag `vX.Y.Z` and
|
||||
publish the GitHub Release — **release notes must be accurate before
|
||||
publishing**: `notify.yml` announces them to Discord at once (docs/12 §2;
|
||||
the manual re-run takes a `tag` input, passed on as `tag_override`).
|
||||
3. Manual posts where the automation doesn't reach (Discord announcement
|
||||
channels with role pings, pinned messages).
|
||||
|
||||
**Launch day (v1.0.0, 2026-07-30)** followed the same shape: final seed PR
|
||||
merged → production verified → tag + release → Discord via `notify.yml` →
|
||||
manual posts → the RSS → notify.py cron enabled for ongoing per-app
|
||||
announcements (§5).
|
||||
|
||||
## 4. Seed list — 32 launch apps (proposed; H7 approves)
|
||||
|
||||
@@ -125,8 +205,12 @@ free tier self-sufficient → `free` (C3); Sublime Text — perpetual license
|
||||
|
||||
The existing cross-poster consumes `/rss.xml` (guid = slug, docs/03 §7) on
|
||||
its GitHub Actions cron and posts new items to Telegram, Discord webhook,
|
||||
Bluesky, Mastodon, X, Facebook. SoftHarbor-side contract: never reuse a
|
||||
slug; never backdate `addedAt`; feed stays deterministic. Message template
|
||||
Bluesky, Mastodon, X, Facebook. It announces **every `<guid>` it has not
|
||||
seen**, so its failure modes are public and irreversible. SoftHarbor-side
|
||||
contract: never reuse or rename a slug; never backdate `addedAt`; the feed
|
||||
stays deterministic (pinned collator, docs/05 §A4); never change the guid
|
||||
shape or the 50-item window's order without meaning to announce.
|
||||
`check:feed` enforces the emitted shape on every build. Message template
|
||||
(configured on the notify.py side):
|
||||
`🆕 {name} — {summary.en} · {site}/apps/{slug}`.
|
||||
|
||||
@@ -135,19 +219,22 @@ slug; never backdate `addedAt`; feed stays deterministic. Message template
|
||||
| Cadence | Task |
|
||||
|---|---|
|
||||
| per-PR | vetting checklist on new/changed entries |
|
||||
| **after every merge** | wait for the merge commit's "Workers Builds" check, then verify production (§3) |
|
||||
| daily (auto) | quarantine sweep (docs/12 §4) |
|
||||
| weekly (auto) | link-check triage — fix, replace with official mirror, or flag |
|
||||
| weekly (auto) | Renovate window + osv findings |
|
||||
| monthly (manual, ~30 min) | re-verify the 10 oldest `checkedAt` entries; refresh dates |
|
||||
| weekly (auto) | link-check triage — the one `link-rot` issue is refreshed or closed (docs/12 §5); fix, replace with official mirror, or flag |
|
||||
| weekly (auto, Monday) | Dependabot PRs (npm + actions, 2-day cooldown) — merge when CI is green; osv/audit findings fail CI on their own |
|
||||
| daily (auto, 00:41 UTC) | VirusTotal re-check (docs/12 §4b): checks older than 90 days are re-scanned into the one `vt/recheck` PR — review and merge it; triage any `[vt] <slug>` issue (false positive → back to `clean` with a note; confirmed → `flagged` + `pnpm quarantine`). GitHub disables a public repo's schedules after 60 days without activity — re-enable the workflow if it ever goes quiet |
|
||||
| monthly (manual, ~10 min) | GSC review: Coverage, Core Web Vitals, hreflang errors; skim DMARC reports (docs/16 §6/§8) |
|
||||
| **annually (manual, ~2 min)** | **Roll `Expires` in `public/.well-known/security.txt` forward one year** (docs/09 §5). An expired `security.txt` is treated as invalid by scanners and researchers — and nothing else in this repo would notice. |
|
||||
| once, post-launch | HSTS phase transitions P1 → P2 (+2 weeks) → optional P3/preload (H9) — docs/16 §5 |
|
||||
| once, post-launch | HSTS phase transitions P1 → P2 (+2 weeks) → optional P3/preload (H9) — docs/16 §5. Observed 2026-10-21: already at P3 (`preload` in the header) — docs/15 §5 |
|
||||
| quarterly | review category taxonomy & criteria rulings; prune tags |
|
||||
|
||||
## 7. Incident playbook (listed app turns out harmful)
|
||||
|
||||
1. Set `flagged` (PR or label) → workflow quarantines within the day; site
|
||||
updates on merge.
|
||||
1. Set `flagged` and run `pnpm quarantine` in the same PR (`validate:data`
|
||||
rejects a flag left in place); the nightly workflow is the safety net
|
||||
for anything that slips through. Site updates once the merge has
|
||||
deployed — verify it (§3).
|
||||
2. Tracking issue gets evidence links; entry's page 404s (acceptable — the
|
||||
RSS item remains historical, do not rewrite the feed).
|
||||
3. If users were plausibly exposed (app was `clean` at the time), post a
|
||||
|
||||
+238
-110
@@ -1,13 +1,15 @@
|
||||
# 14 — Legal (licensing · gate · bilingual drafts)
|
||||
|
||||
> ⚠️ These drafts are templates prepared by the project, **not legal
|
||||
> advice**. Kokone reviews and approves before first public deploy (H6).
|
||||
> Since v1.1 the site URL is final (`https://softharbor.net`) and the
|
||||
> contact address is `contact@softharbor.net` — it must be live via Email
|
||||
> Routing (docs/16 §6, H5) before these pages publish. At implementation
|
||||
> time each draft below is split into its own page under `/legal/*` (EN)
|
||||
> and `/vi/legal/*` (VI). English is canonical (docs/07 §8).
|
||||
> All drafts: **Last updated: 2026-07-20**.
|
||||
> advice**. Kokone approved them before the first public deploy (H6,
|
||||
> 2026-07-28). The site URL is final (`https://softharbor.net`). Since
|
||||
> 2026-10-21 (D27) there is **one contact address per purpose** at
|
||||
> `@poli0981.dev` — the table in Part 2 — and `contact@softharbor.net` is
|
||||
> retired everywhere. Each document is its own page under `/legal/*` (EN)
|
||||
> and `/vi/legal/*` (VI); English is canonical (docs/07 §8). The shipped
|
||||
> wording lives in `src/components/legal/*.astro` (Part 3); every document
|
||||
> carries its **own** "Last updated" date (`LEGAL_UPDATED`) — all six read
|
||||
> 2026-10-21 as of v1.1.
|
||||
|
||||
## Part 1 — Licensing model
|
||||
|
||||
@@ -40,6 +42,8 @@ structure). It does **not** cover the listed applications, their names, or
|
||||
their logos, which belong to their respective owners (see /legal/trademarks).
|
||||
Everything in this repository outside `src/data/` is licensed under
|
||||
GPL-3.0-only — see `LICENSE`.
|
||||
|
||||
Questions about this license or how to attribute: copyright@poli0981.dev.
|
||||
```
|
||||
|
||||
Provenance rule enforcing licensability: summaries are written from scratch
|
||||
@@ -49,25 +53,102 @@ actually grant CC BY-SA on them.
|
||||
## Part 2 — Legal gate specification
|
||||
|
||||
**Purpose:** ensure every user has seen the disclaimer (T1) before using
|
||||
the directory, in the CommandForge tradition, adapted to the web.
|
||||
the directory, in the CommandForge tradition, adapted to the web — and,
|
||||
since v1.1, run a consent-first human check (D25).
|
||||
|
||||
**Two steps, one dialog.** Step 1 is the documents and "I understand and
|
||||
accept". Step 2 — only after step 1 — is a Cloudflare Turnstile check whose
|
||||
token the site's Worker confirms (docs/09 §4a, algorithm docs/05 §A9). A
|
||||
returning visitor whose check has lapsed sees step 2 only.
|
||||
|
||||
| Aspect | Spec |
|
||||
|---|---|
|
||||
| Trigger | First route render when `localStorage['sh:legal'] !== LEGAL_VERSION` (docs/05 §A7) |
|
||||
| Component | `ShLegalGate.svelte`, `client:load`, `transition:persist`, native `<dialog>` `showModal()` |
|
||||
| Exempt routes | `/legal/**`, `/vi/legal/**`, `/404`, `/offline`, `/errors/*` — so the gate can link to the very documents it asks users to accept, and error/offline states never dead-lock |
|
||||
| Content | Locale-matched summary (below) + links to Disclaimer/Privacy/Terms + single accept button. No decline button: the gate itself explains that leaving the site is the alternative |
|
||||
| Interaction | Focus trapped by `showModal()`; **Esc intercepted** (`cancel` event `preventDefault`) pre-accept; page content behind is rendered but `inert` |
|
||||
| Crawlers/SEO | Content renders underneath normally (dialog is an overlay, no cloaking, no JS-gated content); bots don't execute acceptance and don't need to |
|
||||
| Persistence | Accept ⇒ `sh:legal = LEGAL_VERSION`. Version bump (any legal doc change) re-opens for everyone. localStorage unavailable ⇒ fail open per session (in-memory accept) |
|
||||
| Copy EN | **Before you continue** — SoftHarbor is a link directory. We don't host downloads, and we can't guarantee third-party software. Statuses like "no known warnings" reflect checks on the date shown — verify anything you install. By continuing you accept the [Disclaimer], [Terms of Use] and [Privacy Policy]. → **I understand and accept** |
|
||||
| Copy VI | **Trước khi tiếp tục** — SoftHarbor là trang tổng hợp liên kết. Chúng tôi không lưu trữ tệp cài đặt và không thể bảo đảm cho phần mềm bên thứ ba. Trạng thái như "không có cảnh báo đã biết" chỉ phản ánh việc kiểm tra tại ngày ghi kèm — hãy tự xác minh trước khi cài đặt. Khi tiếp tục, bạn chấp nhận [Tuyên bố miễn trừ], [Điều khoản sử dụng] và [Chính sách quyền riêng tư]. → **Tôi hiểu và chấp nhận** |
|
||||
| Trigger | Shown when `sh:legal ≠ LEGAL_VERSION` (step 1, docs/05 §A7) **or** `sh:human` has lapsed (step 2 only) |
|
||||
| Component | `ShLegalGate.svelte`, `client:load`, rendered by `Base.astro` on every non-exempt page — no `transition:persist`: every navigation is a full document load (docs/02 §6), so each page mounts its own gate with its own locale's strings |
|
||||
| Exempt pages | Declared by the page with `gateExempt` — the island is simply not rendered: the six legal documents (EN + VI), `/contact` (EN + VI), `/404`, `/offline`, `/errors/*`. The gate links to the very documents it asks users to accept; error and offline pages must never dead-lock (Workers serves `404.html`, and the SW the offline page, at whatever URL was requested — the old path regex never matched them); a security or copyright notice must never wait behind acceptance |
|
||||
| Content, step 1 | Locale-matched summary (below) + links to Disclaimer, Terms and Privacy under the locale's `/legal` base + a single accept button. No decline button: the copy explains that leaving the site is the alternative. A scale icon tile heads the step |
|
||||
| Content, step 2 | "One moment" — what Turnstile is for, a spinner, and a link to the Privacy Policy's `#turnstile` section; the widget shows itself only if it needs a click (`interaction-only`). If the check cannot run: "The check could not run, so it was skipped. Come on in." for 1.5 s, then the gate closes. A shield icon tile heads the step |
|
||||
| Step 2 outcome | Pass ⇒ `sh:human` = now + 48 h. Anything else — script blocked, widget error, 10 s timeout (120 s once it asks for a click), Worker 429/503/unreachable, three rejected challenges — ⇒ now + 1 h and the visitor is **let in** (fail open, docs/09 §4a) |
|
||||
| Interaction | Native `<dialog>` opened with `showModal()`: focus trapped, everything behind it inert. Focus lands on the step's **heading**, so a screen reader reads the notice before any control. **Esc cannot dismiss it**: `closedby="none"`, `cancel` prevented while required, and if anything closes it early (Chromium's close watcher honours `preventDefault()` only after user activation) it re-opens at once. `body[data-sh-gate="open"]` makes global shortcuts (`/`) stand down (docs/06 §9). On phones (< 40 rem) it is a bottom sheet |
|
||||
| Crawlers/SEO | Content renders underneath normally (dialog is an overlay, no cloaking, no JS-gated content); bots don't execute acceptance and don't need to. With JS off the island never runs and no gate appears |
|
||||
| Persistence | Accept ⇒ `sh:legal = LEGAL_VERSION` (policy below). `sh:human` holds an expiry timestamp. localStorage unavailable ⇒ fail open per page/session (both records held in memory on `globalThis`) |
|
||||
| Copy EN, step 1 | **Before you continue** — SoftHarbor is a link directory. We don't host downloads, and we can't guarantee third-party software. Statuses like "no known warnings" reflect checks on the date shown — verify anything you install. By continuing you accept the [Disclaimer], [Terms of Use] and [Privacy Policy]. → **I understand and accept** |
|
||||
| Copy VI, step 1 | **Trước khi tiếp tục** — SoftHarbor là trang tổng hợp liên kết. Chúng tôi không lưu trữ tệp cài đặt và không thể bảo đảm cho phần mềm bên thứ ba. Trạng thái như "không có cảnh báo đã biết" chỉ phản ánh việc kiểm tra tại ngày ghi kèm — hãy tự xác minh trước khi cài đặt. Khi tiếp tục, bạn chấp nhận [Tuyên bố miễn trừ], [Điều khoản sử dụng] và [Chính sách quyền riêng tư]. → **Tôi hiểu và chấp nhận** |
|
||||
| Copy EN, step 2 | **One moment** — A quick automatic check by Cloudflare Turnstile that you are a person, not a bot. It usually takes a second and needs nothing from you — see the [Privacy Policy]. |
|
||||
| Copy VI, step 2 | **Chờ một chút** — Cloudflare Turnstile đang tự động kiểm tra để xác nhận bạn là người chứ không phải bot. Thường chỉ mất một giây và bạn không cần làm gì — xem [Chính sách quyền riêng tư]. |
|
||||
|
||||
All gate copy lives in the dictionaries (`gate.*`), resolved server-side for
|
||||
the page's locale only and passed to the island as props — importing the
|
||||
dictionaries into the island would bundle every key (docs/07 §3).
|
||||
|
||||
### `LEGAL_VERSION` policy
|
||||
|
||||
- `LEGAL_VERSION` (`src/lib/legal.ts`) is the version of the **accepted
|
||||
set** — Disclaimer, Terms of Use and Privacy Policy (`ACCEPTED_DOCS`),
|
||||
the three documents the gate asks for. **Bump it when one of those three
|
||||
changes materially**: the bump re-opens the gate for everyone, which is
|
||||
the intended behaviour. Typos and formatting do not bump it.
|
||||
- `LEGAL_UPDATED` gives each of the **six** documents its own "Last
|
||||
updated" date, shown on its page. Trademarks, Third-party notices and the
|
||||
AI Disclosure move only their own date — they are informational and not
|
||||
part of what is accepted.
|
||||
- **A test enforces the link** (`src/lib/legal.test.ts`): every accepted
|
||||
document's `LEGAL_UPDATED` must be ≤ `LEGAL_VERSION` — editing Privacy
|
||||
without bumping the version fails `pnpm test`. Every date must be a real
|
||||
day that has already happened.
|
||||
- Equality, never ordering: any stored value other than the current one —
|
||||
older, *newer*, garbage — re-opens the gate (docs/05 §A7).
|
||||
- History: **2026-07-28** (H6 approval of these drafts) · **2026-07-30**
|
||||
(while one constant still dated every page, it moved with the new AI
|
||||
Disclosure) · **2026-10-21** (v1.1: Privacy covers Web Analytics and the
|
||||
Turnstile check and names the operator; Terms gained the operator and a
|
||||
copyright-complaint procedure; nine EN/VI wording gaps and two false AI
|
||||
Disclosure claims fixed).
|
||||
|
||||
### Contacts (D27)
|
||||
|
||||
One address per purpose, all `@poli0981.dev`, all reaching the one
|
||||
maintainer; `src/lib/contacts.ts` is the single source — pages, legal
|
||||
documents and `security.txt` import from it or match it, never hard-code
|
||||
another. Mail to `poli0981.dev` is delivered to a **Google-hosted** mailbox
|
||||
(MX `aspmx.l.google.com`), which the Privacy Policy says (`#email`).
|
||||
|
||||
| Key | Address | Purpose |
|
||||
|---|---|---|
|
||||
| `security` | `security@poli0981.dev` | vulnerabilities; hijacked or malicious listing links (`security.txt`, `SECURITY.md`, Disclaimer) |
|
||||
| `privacy` | `privacy@poli0981.dev` | the Privacy Policy, data requests |
|
||||
| `legal` | `legal@poli0981.dev` | Terms, Disclaimer, anything else legal |
|
||||
| `dmca` | `dmca@poli0981.dev` | copyright (DMCA-style) notices — the procedure in Terms `#copyright` |
|
||||
| `takedown` | `takedown@poli0981.dev` | a developer asking for their listing or logo to be changed or removed; trademark complaints |
|
||||
| `copyright` | `copyright@poli0981.dev` | licensing of the code (GPL-3.0-only) and the dataset (CC BY-SA 4.0) |
|
||||
| `conduct` | `code@poli0981.dev` | Code of Conduct reports |
|
||||
| `press` | `press@poli0981.dev` | press |
|
||||
| `collab` | `collab@poli0981.dev` | collaboration |
|
||||
|
||||
Deliberately absent: `sponsor@` (a neutral directory takes no paid
|
||||
placement) and `games@` (another project's). The Contact page
|
||||
(`/contact`, `/vi/contact`) lists them in order of urgency and is
|
||||
gate-exempt.
|
||||
|
||||
## Part 3 — Draft legal documents (EN canonical · VI courtesy)
|
||||
|
||||
Every VI page carries: *"Bản tiếng Việt chỉ nhằm mục đích tham khảo; nếu có
|
||||
khác biệt, bản tiếng Anh được ưu tiên áp dụng."*
|
||||
|
||||
**Where the text lives.** The canonical wording is the shipped components,
|
||||
`src/components/legal/{Disclaimer,Privacy,Terms,Trademarks,ThirdParty,
|
||||
AiDisclosure}.astro` — EN and VI in the same file, so a change to one is
|
||||
visibly a change to the other in review — wrapped by `LegalPage.astro`
|
||||
(title, "Last updated", VI notice). Addresses come from
|
||||
`src/lib/contacts.ts`. The drafts below are the approved texts (H6,
|
||||
2026-07-28; the AI Disclosure 2026-07-30), kept as the record and
|
||||
corrected here only where facts changed: the contact addresses (D27), the
|
||||
Privacy Policy and Terms — which v1.1 rewrote and which are therefore
|
||||
**summarised** below instead of quoted — the third-party page's new
|
||||
sections and the AI Disclosure's model list. The shipped Disclaimer and
|
||||
Trademarks also carry small v1.1 wording fixes the drafts do not; for exact
|
||||
wording, read the component.
|
||||
|
||||
### 3a. Disclaimer — `/legal/disclaimer`
|
||||
|
||||
**EN.** SoftHarbor is an independent, non-commercial directory of desktop
|
||||
@@ -85,8 +166,12 @@ our check. Always download from official sources, verify signatures or
|
||||
checksums where offered, and use your own judgment. (5) **Your risk:**
|
||||
installing third-party software is entirely at your own risk; to the
|
||||
maximum extent permitted by law we accept no liability for damages arising
|
||||
from software you obtain via links on this site. (6) Report dangerous or
|
||||
incorrect listings: GitHub issues or `contact@softharbor.net`.
|
||||
from software you obtain via links on this site. (6) **Reporting a
|
||||
listing:** a dangerous one — a hijacked, look-alike or malicious download
|
||||
link — goes privately to `security@poli0981.dev`, not to a public issue, so
|
||||
the bad link is not spread further; outdated or wrong information goes to a
|
||||
GitHub issue; a developer who wants their entry changed or removed writes
|
||||
to `takedown@poli0981.dev`.
|
||||
|
||||
**VI.** SoftHarbor là trang tổng hợp phần mềm desktop độc lập, phi thương
|
||||
mại. (1) **Không liên kết:** chúng tôi không liên kết, không được bảo trợ
|
||||
@@ -103,84 +188,100 @@ Phần mềm có thể bị xâm phạm sau thời điểm kiểm tra. Hãy luô
|
||||
chính thức, xác minh chữ ký/checksum nếu có, và tự cân nhắc. (5) **Rủi ro
|
||||
của bạn:** việc cài đặt phần mềm bên thứ ba hoàn toàn thuộc rủi ro của bạn;
|
||||
trong phạm vi tối đa pháp luật cho phép, chúng tôi không chịu trách nhiệm
|
||||
cho thiệt hại phát sinh. (6) Báo cáo mục nguy hiểm/sai: GitHub issues hoặc
|
||||
`contact@softharbor.net`.
|
||||
cho thiệt hại phát sinh. (6) **Báo cáo một mục:** mục nguy hiểm — liên kết
|
||||
tải về bị chiếm quyền, giả mạo hoặc độc hại — hãy báo riêng tới
|
||||
`security@poli0981.dev`, đừng mở issue công khai, để liên kết xấu không bị
|
||||
lan rộng thêm; thông tin lỗi thời hoặc sai hãy báo qua GitHub issue; nhà
|
||||
phát triển muốn sửa hoặc gỡ mục của mình có thể viết tới
|
||||
`takedown@poli0981.dev`.
|
||||
|
||||
### 3b. Privacy Policy — `/legal/privacy`
|
||||
|
||||
**EN.** Short version: we collect nothing. (1) **No accounts, no forms, no
|
||||
analytics, no ads, no cookies.** (2) **Local preferences only:** language,
|
||||
theme, and legal-acceptance version are stored in your browser's
|
||||
localStorage (`sh:lang`, `sh:theme`, `sh:legal`) and never transmitted;
|
||||
clearing site data removes them. A service worker caches a small offline
|
||||
page. (3) **Infrastructure:** the site is served by Cloudflare, which
|
||||
processes connection data (such as IP addresses) as a network provider
|
||||
under its own privacy policy. We do not receive or store this data;
|
||||
aggregate request counts are visible to us in Cloudflare's dashboard.
|
||||
(4) **Bug reports:** the "Report a bug" button opens a **prefilled GitHub
|
||||
issue in your browser** containing the page URL, your browser/OS string,
|
||||
and recent console error lines from this site. Nothing is sent until you
|
||||
review and submit it on GitHub, under GitHub's terms and privacy policy.
|
||||
(5) **Third-party links** lead to sites with their own policies.
|
||||
(6) **Changes** to this policy bump the version date and re-show the
|
||||
consent gate. Contact: `contact@softharbor.net`.
|
||||
**Rewritten 2026-10-21 (v1.1) — summary of the shipped text; exact EN and
|
||||
VI wording in `Privacy.astro`.** The v1.0 draft ("we collect nothing … no
|
||||
analytics") stopped being true with D25/D26 and is not reproduced here
|
||||
(git history has it). Section anchors are stable — the gate links
|
||||
`#turnstile`:
|
||||
|
||||
**VI.** Phiên bản ngắn gọn: chúng tôi không thu thập gì. (1) **Không tài
|
||||
khoản, không biểu mẫu, không analytics, không quảng cáo, không cookie.**
|
||||
(2) **Chỉ lưu tuỳ chọn cục bộ:** ngôn ngữ, giao diện sáng/tối và phiên bản
|
||||
điều khoản đã chấp nhận được lưu trong localStorage của trình duyệt
|
||||
(`sh:lang`, `sh:theme`, `sh:legal`), không bao giờ được truyền đi; xoá dữ
|
||||
liệu trang sẽ xoá chúng. Service worker lưu một trang offline nhỏ. (3) **Hạ
|
||||
tầng:** trang được phục vụ bởi Cloudflare — đơn vị xử lý dữ liệu kết nối
|
||||
(như địa chỉ IP) theo chính sách riêng của họ với vai trò nhà cung cấp hạ
|
||||
tầng. Chúng tôi không nhận hay lưu dữ liệu này; chỉ thấy số liệu truy cập
|
||||
tổng hợp trong bảng điều khiển Cloudflare. (4) **Báo lỗi:** nút "Report a
|
||||
bug" mở một **issue GitHub được điền sẵn trong trình duyệt của bạn** gồm
|
||||
URL trang, chuỗi trình duyệt/hệ điều hành và các dòng lỗi console gần đây
|
||||
của trang này. Không có gì được gửi đi cho tới khi bạn xem lại và tự đăng
|
||||
trên GitHub, theo điều khoản và chính sách của GitHub. (5) **Liên kết bên
|
||||
thứ ba** có chính sách riêng. (6) **Thay đổi** chính sách sẽ cập nhật ngày
|
||||
phiên bản và hiển thị lại hộp thoại chấp nhận. Liên hệ: `contact@softharbor.net`.
|
||||
- **Short version** — no accounts, no ads, no cookies, nothing sold or
|
||||
shared for advertising; two Cloudflare services see limited data —
|
||||
statistics that skip you under Global Privacy Control, and a bot check
|
||||
that runs only after you accept; your settings stay in your browser.
|
||||
- **`#who`** — the operator: an individual developer, poli0981
|
||||
(SkullMute), in Vietnam, who decides how the little data described is
|
||||
handled; questions to `privacy@poli0981.dev`.
|
||||
- **`#storage`** — localStorage `sh:legal`, `sh:human`, `sh:lang`,
|
||||
`sh:theme`, `sh:scrollbar`, `sh:motion`, never sent anywhere; a service
|
||||
worker stores the offline page, styles and fonts; no cookies (docs/09 §8).
|
||||
- **`#analytics`** — Cloudflare Web Analytics: no cookies, nothing stored
|
||||
in the browser; reports page address, referrer, load timings and
|
||||
user-agent; Cloudflare derives a country and shows us totals only, never
|
||||
individual visits or IPs. Never runs under Global Privacy Control, nor
|
||||
on any host but softharbor.net. Basis: legitimate interest.
|
||||
- **`#turnstile`** — after acceptance only, once; runs in a frame from
|
||||
challenges.cloudflare.com; the one-time token goes to `/api/verify`,
|
||||
which forwards it with the IP to Siteverify; requests are counted per IP
|
||||
(per /64 for IPv6) for one minute to prevent abuse; the endpoint logs only
|
||||
success and duration. A pass is remembered 48 h (`sh:human`); if the
|
||||
check cannot run the visitor is let in and it is retried after an hour.
|
||||
Basis: legitimate interest.
|
||||
- **`#hosting`** — Cloudflare serves the site and the endpoint and
|
||||
processes connection data under its own policy; we see aggregate counts.
|
||||
- **`#email`** — `@poli0981.dev` mail is delivered to a Google-hosted
|
||||
mailbox; used only to deal with what was written; deleted when no longer
|
||||
needed, or sooner on request.
|
||||
- **`#bug-reports`** — "Report a bug" is a link to a prefilled GitHub issue
|
||||
form: **GitHub receives** the page URL, user-agent and recent error lines
|
||||
**as soon as the link is opened**; nothing is filed until the visitor
|
||||
submits it.
|
||||
- **`#links`** — developers' sites have their own policies.
|
||||
- **`#rights`** — Global Privacy Control turns statistics off; blocking
|
||||
challenges.cloudflare.com still lets you in; clearing site data removes
|
||||
everything stored; access, correction, deletion or objection via
|
||||
`privacy@poli0981.dev`; the right to complain to a data protection
|
||||
authority.
|
||||
- **`#changes`** — a change moves the date and the gate asks everyone to
|
||||
accept the new version.
|
||||
|
||||
### 3c. Terms of Use — `/legal/terms`
|
||||
|
||||
**EN.** (1) **Acceptance:** using `https://softharbor.net` means you accept these
|
||||
terms, the Disclaimer, and the Privacy Policy; the consent dialog records
|
||||
acceptance in your browser. (2) **The service:** an informational directory
|
||||
of links and metadata; no downloads are hosted; availability is not
|
||||
guaranteed and the service may change or stop at any time. (3) **Acceptable
|
||||
use:** no scraping at abusive rates (the public dataset at `/api/apps.json`
|
||||
exists — use it), no attempts to disrupt the service, no misrepresentation
|
||||
of SoftHarbor as affiliated with listed vendors. (4) **Intellectual
|
||||
property:** site code is GPL-3.0-only; the dataset is CC BY-SA 4.0 (see
|
||||
LICENSE-DATA); third-party names/logos remain their owners' property.
|
||||
(5) **No warranty / limitation of liability:** the service is provided "as
|
||||
is" without warranties of any kind; to the maximum extent permitted by law,
|
||||
the operator is not liable for any damages arising from use of the service
|
||||
or of third-party software reached through it. (6) **Changes:** material
|
||||
changes bump the version and re-show the consent dialog. (7) **Governing
|
||||
law:** the laws of Vietnam, without regard to conflict-of-law rules; if a
|
||||
provision is unenforceable, the remainder stands. Contact:
|
||||
`contact@softharbor.net`.
|
||||
**Revised 2026-10-21 (v1.1) — clause summary of the shipped text; exact EN
|
||||
and VI wording in `Terms.astro`.** The approved v1.0 clauses (1)–(7) stand
|
||||
in substance; v1.1 added the operator, the bot check and a
|
||||
copyright-complaint procedure, and changed the contact. Shipped order:
|
||||
|
||||
**VI.** (1) **Chấp nhận:** việc sử dụng `https://softharbor.net` đồng nghĩa bạn chấp
|
||||
nhận các điều khoản này, Tuyên bố miễn trừ và Chính sách quyền riêng tư;
|
||||
hộp thoại đồng ý ghi nhận việc chấp nhận trong trình duyệt của bạn.
|
||||
(2) **Dịch vụ:** trang thông tin tổng hợp liên kết và siêu dữ liệu; không
|
||||
lưu trữ tệp tải về; không bảo đảm tính khả dụng; dịch vụ có thể thay đổi
|
||||
hoặc dừng bất kỳ lúc nào. (3) **Sử dụng hợp lệ:** không scrape với tần suất
|
||||
gây hại (đã có bộ dữ liệu công khai tại `/api/apps.json` — hãy dùng nó),
|
||||
không phá hoại dịch vụ, không mạo nhận SoftHarbor liên kết với các nhà phát
|
||||
triển được liệt kê. (4) **Sở hữu trí tuệ:** mã nguồn theo GPL-3.0-only; bộ
|
||||
dữ liệu theo CC BY-SA 4.0 (xem LICENSE-DATA); tên/logo bên thứ ba thuộc chủ
|
||||
sở hữu tương ứng. (5) **Không bảo đảm / giới hạn trách nhiệm:** dịch vụ
|
||||
cung cấp "nguyên trạng" không kèm bất kỳ bảo đảm nào; trong phạm vi tối đa
|
||||
pháp luật cho phép, người vận hành không chịu trách nhiệm cho thiệt hại
|
||||
phát sinh từ việc dùng dịch vụ hoặc phần mềm bên thứ ba truy cập qua dịch
|
||||
vụ. (6) **Thay đổi:** thay đổi trọng yếu sẽ nâng phiên bản và hiển thị lại
|
||||
hộp thoại đồng ý. (7) **Luật áp dụng:** pháp luật Việt Nam; nếu một điều
|
||||
khoản vô hiệu, các điều khoản còn lại vẫn giữ hiệu lực. Liên hệ:
|
||||
`contact@softharbor.net`.
|
||||
1. **`#operator` — Who we are:** `https://softharbor.net` ("SoftHarbor") is
|
||||
a non-commercial project run by an individual developer, poli0981
|
||||
(SkullMute), in Vietnam — "we" or "the operator".
|
||||
2. **Acceptance:** using the site means accepting these terms, the
|
||||
Disclaimer and the Privacy Policy; the consent dialog records acceptance
|
||||
in the browser, *then runs the automatic bot check the Privacy Policy
|
||||
describes*.
|
||||
3. **The service:** an informational directory of links and metadata; no
|
||||
downloads hosted; availability not guaranteed; may change or stop.
|
||||
4. **Acceptable use:** no scraping at abusive rates (use
|
||||
`/api/apps.json`), no attempts to disrupt the service **or to get past
|
||||
its bot check by automated means**, no misrepresentation of SoftHarbor
|
||||
as affiliated with listed vendors.
|
||||
5. **Intellectual property:** code GPL-3.0-only; dataset CC BY-SA 4.0
|
||||
(LICENSE-DATA); third-party names and logos remain their owners'
|
||||
(Trademarks).
|
||||
6. **`#copyright` — Copyright complaints:** email `dmca@poli0981.dev` with
|
||||
the work owned; the material and its address on the site; name and
|
||||
contact details; a good-faith statement that the use is not authorised;
|
||||
a statement that the notice is accurate and the sender owns the right or
|
||||
may act for its owner; a signature (a typed full name is enough). We
|
||||
remove or disable the material promptly and tell whoever added it, who
|
||||
may counter-notify to the same address. A developer wanting a listing or
|
||||
logo changed writes to `takedown@poli0981.dev` instead.
|
||||
7. **No warranty / limitation of liability:** "as is"; to the maximum
|
||||
extent permitted by law the operator is not liable for damages from the
|
||||
service or third-party software reached through it.
|
||||
8. **Changes:** material changes bump the version and re-show the consent
|
||||
dialog (Part 2 policy).
|
||||
9. **Governing law:** Vietnam, without regard to conflict-of-law rules;
|
||||
an unenforceable provision leaves the rest standing.
|
||||
10. **Contact:** `legal@poli0981.dev`.
|
||||
|
||||
### 3d. Trademarks — `/legal/trademarks`
|
||||
|
||||
@@ -194,7 +295,7 @@ vector marks, no distortion), at reasonable UI sizes, next to accurate
|
||||
information, sourced from the Simple Icons set or the vendor's official
|
||||
brand assets. "SoftHarbor" and the SoftHarbor wordmark identify this
|
||||
project. **Takedown:** if you own a mark and want its use changed or
|
||||
removed, email `contact@softharbor.net` or open a GitHub issue — we comply
|
||||
removed, email `takedown@poli0981.dev` or open a GitHub issue — we comply
|
||||
promptly and remove the entry's logo (or the entry) while discussing.
|
||||
|
||||
**VI.** Mọi tên sản phẩm, thương hiệu và logo trên SoftHarbor là nhãn hiệu
|
||||
@@ -206,7 +307,7 @@ biến dạng), ở kích thước hợp lý, đi kèm thông tin chính xác, l
|
||||
Simple Icons hoặc bộ nhận diện chính thức của nhà phát triển. "SoftHarbor"
|
||||
và wordmark SoftHarbor nhận diện dự án này. **Yêu cầu gỡ bỏ:** nếu bạn là
|
||||
chủ sở hữu nhãn hiệu và muốn thay đổi/gỡ việc sử dụng, hãy email
|
||||
`contact@softharbor.net` hoặc mở GitHub issue — chúng tôi sẽ xử lý nhanh chóng và
|
||||
`takedown@poli0981.dev` hoặc mở GitHub issue — chúng tôi sẽ xử lý nhanh chóng và
|
||||
tạm gỡ logo (hoặc mục liên quan) trong quá trình trao đổi.
|
||||
|
||||
### 3e. Third-Party Notices — `/legal/third-party`
|
||||
@@ -221,11 +322,20 @@ asset dependencies and their licenses:
|
||||
| Simple Icons | CC0-1.0 | **Caveat shown verbatim:** the icons are CC0, but the brands they depict remain trademarks of their owners; see /legal/trademarks |
|
||||
| Bricolage Grotesque · Be Vietnam Pro · IBM Plex Mono | SIL OFL 1.1 | self-hosted via Fontsource |
|
||||
|
||||
Full machine-generated dependency list ships as `/legal/third-party`
|
||||
appendix regenerated each release (`pnpm licenses list` → build step).
|
||||
**VI intro.** SoftHarbor được xây dựng trên phần mềm mã nguồn mở; bảng trên
|
||||
liệt kê thành phần và giấy phép; danh sách đầy đủ được tạo tự động mỗi bản
|
||||
phát hành.
|
||||
Since v1.1 the page has two more sections. **`#services`** — the services
|
||||
that receive requests while the site is used, each with a link to its own
|
||||
privacy policy: Cloudflare (hosting and delivery, the `/api/verify`
|
||||
endpoint, Web Analytics, Turnstile) and GitHub (the repository, issues, the
|
||||
prefilled bug-report form). **`#packages` — "Every package in this
|
||||
build"**: each `dependencies` entry of `package.json` with its *installed*
|
||||
version and the license it declares, generated at **build time** by
|
||||
`src/lib/licenses.ts` (server-only, read from `node_modules`), so it cannot
|
||||
fall behind the code. (v1.0 promised "a full machine-generated dependency
|
||||
list" and shipped none; `pnpm licenses list` was never wired.) Licensing
|
||||
questions: `copyright@poli0981.dev`.
|
||||
**VI intro.** SoftHarbor được xây dựng trên phần mềm mã nguồn mở. Các thành
|
||||
phần và giấy phép tương ứng: (same table; the services and package
|
||||
sections follow, in Vietnamese).
|
||||
|
||||
### 3f. AI Disclosure — `/legal/ai-disclosure`
|
||||
|
||||
@@ -235,16 +345,21 @@ they cannot see how the list was assembled. It also backs Part 1: the dataset
|
||||
can only carry CC BY-SA 4.0 because the summaries are the project's own words
|
||||
(hard rule 8), and saying so plainly is stronger than leaving it implied.
|
||||
|
||||
Must name the **model, its version identifier, and its developer** — currently
|
||||
Claude Opus 5 (`claude-opus-5`), Anthropic, used through Claude Code.
|
||||
Must name **each model whose work lands, its version identifier, and its
|
||||
developer** — currently Claude models by Anthropic, used through Claude
|
||||
Code: **Claude Opus 5** (`claude-opus-5`) for the site and catalogue
|
||||
through v1.0, and **Claude Opus 5.5** (`claude-opus-5-5`) for the v1.1 and
|
||||
v1.2 work of October 2026; no other AI system contributed. Every claim on the page
|
||||
must stay literally true — update it when a process changes (two false
|
||||
claims were corrected on 2026-10-21).
|
||||
|
||||
| Area | Position |
|
||||
| Area | Position (as shipped, v1.2) |
|
||||
|---|---|
|
||||
| Source code | AI-assisted, maintainer-reviewed, same automated gates as any change |
|
||||
| Tests | AI-drafted, kept only once seen to fail on the bug they claim to cover |
|
||||
| Finding the software | Candidate list AI-assisted; **inclusion is a human decision** against docs/00 §3, links machine-checked per PR and weekly |
|
||||
| Source code | AI-assisted, reviewed and run by the maintainer; the same automated gates as any change — lint, type-check, unit and browser tests, schema validation, EN/VI parity, a build, a CSP guard |
|
||||
| Tests | Drafted with AI assistance, reviewed against the behaviour they describe; run on every change, and nothing merges while one fails |
|
||||
| Finding the software | Candidate list AI-assisted; **inclusion is a human decision** against docs/00 §3; links machine-checked per PR (changed entries) and weekly (whole catalogue), with "forbidden"/"too many requests" counted as reachable |
|
||||
| Summaries | Written from scratch in both locales, never pasted; VI reviewed by a native speaker, not machine-translated |
|
||||
| Security status | **Not AI-decided** — maintainer runs docs/09 §6, and the scan is linked from the app page |
|
||||
| Security status | **Not AI-decided** — "no known warnings" only after the maintainer ran docs/09 §6; from then on `vt-recheck.yml` re-scans every download page on VirusTotal at least every 90 days and moves the date (a fixed rule, not a model: any warning drops the entry to "unverified" and opens an issue; only the maintainer marks clean, flags or removes). The scan is linked from the app page; where a link changed after its scan, the linked scan is of the earlier link until the next re-check. Updated 2026-10-23 (`LEGAL_UPDATED.aiDisclosure`; not an accepted document, so `LEGAL_VERSION` and the gate are unchanged) |
|
||||
|
||||
Closes with the limits being unchanged: AI assistance is neither a warranty
|
||||
nor an excuse, and a mistake here belongs to the maintainer, not a tool.
|
||||
@@ -255,15 +370,28 @@ from the footer. It is still gate-exempt like every other `/legal/*` route.
|
||||
|
||||
## Part 4 — Review checklist for Kokone (H6)
|
||||
|
||||
- [ ] Confirm `contact@softharbor.net` is live (Email Routing, docs/16 §6)
|
||||
and a test mail arrives before these pages publish (H5).
|
||||
- [ ] Confirm governing-law choice (Vietnam) in Terms §7.
|
||||
- [ ] Confirm the no-decline-button gate wording is acceptable.
|
||||
H6 approved the drafts on 2026-07-28. The 2026-10-21 rewrite (Privacy,
|
||||
Terms, contacts, AI Disclosure) re-opens these items — sign-off on it:
|
||||
⚠ verify.
|
||||
|
||||
- [ ] Confirm the D27 addresses are live and a test mail to each purpose
|
||||
address arrives (the old `contact@softharbor.net` / Email Routing
|
||||
plan of H5 is superseded — docs/16 §6).
|
||||
- [ ] Confirm governing-law choice (Vietnam) in Terms (clause 9 since
|
||||
v1.1; §7 in the v1.0 draft).
|
||||
- [ ] Confirm the no-decline-button gate wording is acceptable, and the
|
||||
step-2 wording about Turnstile.
|
||||
- [ ] Confirm the Privacy Policy's legitimate-interest basis for Web
|
||||
Analytics and Turnstile, and its rights section.
|
||||
- [ ] Confirm the copyright-complaint procedure (Terms `#copyright`) and
|
||||
the operator clause (`#operator`).
|
||||
- [ ] Read both language versions aloud once — tone: calm, plain, no
|
||||
legalese beyond necessity.
|
||||
- [ ] Confirm comfort with C3 free-tier ruling as written in Disclaimer
|
||||
context (pricing can change → covered by 3a(3)).
|
||||
- [ ] Set `LEGAL_VERSION` to the approval date; if drafts change later,
|
||||
bump it (gate re-shows).
|
||||
- [ ] `LEGAL_VERSION` follows the Part 2 policy (2026-10-21 as of v1.1); a
|
||||
later material change to Disclaimer, Terms or Privacy bumps it, and
|
||||
`legal.test.ts` fails if one is dated after it.
|
||||
- [ ] Optional (recommended eventually): a qualified local review of Terms
|
||||
+ Disclaimer. These templates are diligent but are not legal advice.
|
||||
+ Disclaimer + Privacy. These texts are diligent but are not legal
|
||||
advice.
|
||||
+205
-67
@@ -10,30 +10,61 @@
|
||||
| **M3 — Find things** | search index route, ShSearch, ShFilterSheet, sort, nanostores (05) | S2 vectors pass in-app; filters compose; no-JS grid intact | 3 d | ✅ |
|
||||
| **M4 — Trust layer** | legal gate, legal pages ×2 locales, security lines, ShLangSwitch, ShThemeToggle (07, 14) | gate passes S4 checks; parity CI green | 3 d | ✅ |
|
||||
| **M5 — Resilience & pipes** | 404/offline/PWA, dormant errors, /api/apps.json, rss, bug-report button, _headers (08, 09) | launch-checklist infra section fully green | 2–3 d | ✅ |
|
||||
| **M6 — Ship** | CI/CD wiring, branch protection, 30 seed apps, checklist, v1.0.0 (12, 13) | public announcement sent | 3–4 d | ◐ infra done; data + tag + announcement open |
|
||||
| **M6 — Ship** | CI/CD wiring, branch protection, 30 seed apps, checklist, v1.0.0 (12, 13) | public announcement sent | 3–4 d | ✅ 2026-07-30 — v1.0.0 tagged and released with 326 apps |
|
||||
| **M7 — v1.1 review** | post-launch audit: native view transitions, CSP-first head, Harbor UI, display menu, search/URL state, data rules, Playwright e2e, Dependabot; Turnstile + `/api/verify` Worker (D25), Web Analytics (D26), contacts (D27), legal rewrite (all docs) | every gate green in CI; production verified after merge (docs/13 §3) | — | ✅ 2026-10-21 — PRs #23–#25 merged and deployed; v1.1.0 released |
|
||||
| **M8 — v1.2 upkeep** | VirusTotal re-check automation (D30), SonarQube Cloud CI analysis with coverage (D29), Node 26 + TypeScript 6/7 (D28), catalogue batch 2 + two categories (D31) | every gate green in CI, Sonar gate passed; production verified after each merge (docs/13 §3) | — | ✅ 2026-10-23 — PRs #28 #29 #30 #31 #32 and the release PR merged; v1.2.0 released |
|
||||
|
||||
Total ≈ 17–20 focused days, **plus ~1 day for the `softharbor.net` domain
|
||||
package** (docs/16 §10) slotted between M5 and M6. Data entry (M6)
|
||||
parallelizes with earlier milestones once M2 lands.
|
||||
|
||||
**Where it stands (2026-07-28).** `https://softharbor.net` is live and every
|
||||
automated gate is green — `lint · i18n:check · validate:data · test · check ·
|
||||
build · check:styles · knip`, 55 pages from 5 entries, CI and CodeQL passing,
|
||||
deploys handled by Cloudflare Workers Builds on push to `main` (docs/12 §3).
|
||||
**M6 is not closed**: the dataset is 5 of the ~32 seed entries and every one is
|
||||
`security.status: "unverified"`, so **v1.0.0 is deliberately untagged** — see
|
||||
§5. The remaining work is curation and repo settings, not code.
|
||||
**Where it stands (2026-10-23).** v1.2.0, released 2026-10-23: **364 apps in
|
||||
14 categories**, 341 `clean` and 23 `unverified` — each with its VirusTotal
|
||||
scan linked and re-scanned at least every 90 days by `vt-recheck.yml`
|
||||
(D30; nine popular apps went `unverified` on a single engine's warning in
|
||||
the first run and wait for the maintainer's triage, issues #33–#41). CI adds
|
||||
a `sonar` job (D29) and type-checks `.ts` with TypeScript 7 (D28); the
|
||||
build covers 781 pages.
|
||||
|
||||
*Where it stood (2026-10-21), for the record:* v1.0.0 shipped on 2026-07-30: 326 apps in
|
||||
12 categories, 320 `clean` and 6 held at `unverified`, every one with its
|
||||
scan linked. v1.1.0 (`package.json` 1.1.0, CHANGELOG.md), released on
|
||||
2026-10-21, is the post-launch review recorded in §4's 2026-10-21 rows.
|
||||
Every automated gate is green in
|
||||
CI: `lint · check · coverage (ratchet) · build` — which itself runs
|
||||
`validate:data · i18n:check · astro build · postbuild:html · check:csp ·
|
||||
check:assets · check:sw · check:feed` over 701 pages — `· wrangler deploy
|
||||
--dry-run · knip · e2e (Playwright + axe)`, plus the `gates` job and
|
||||
CodeQL. Deploys are Cloudflare Workers Builds (docs/12 §3): serialized, so
|
||||
a merge is verified in production only after its build check is green
|
||||
(docs/13 §3). What remains is settings and sign-offs (§5), not code.
|
||||
|
||||
*Where it stood (2026-07-28), for the record:* live, gates green, 55 pages
|
||||
from 5 entries, all `unverified` — v1.0.0 deliberately untagged until the
|
||||
data was seeded and vetted.
|
||||
|
||||
## 2. Post-v1 backlog (ordered by current intent)
|
||||
|
||||
**Next up after v1.1 (agreed 2026-10-21), in this order:** item 2 first —
|
||||
it has a deadline — then 10 → 11 → 12 (with 3) → 13 → 14 → 15 → 16. The
|
||||
rest wait for evidence. Item numbers are stable because other docs cite
|
||||
them (item 9 especially), so new work is appended, never renumbered.
|
||||
|
||||
1. **Zone upgrades on evidence, not by default** — revisit the
|
||||
deliberately-OFF trio (rate limiting, Bot Fight Mode, Pro-zone Custom
|
||||
Errors) only if abuse or 403/429 UX ever becomes real (docs/16 §9);
|
||||
plus the `?q=` search deep-link that would unlock a `SearchAction`
|
||||
JSON-LD node (docs/16 §7).
|
||||
2. **VirusTotal automation** — scheduled workflow scanning `links.download`
|
||||
via VT API, writing `evidence` + opening flag issues on detections
|
||||
(turns docs/09 §6.5 from manual to assisted).
|
||||
plus a `SearchAction` JSON-LD node (docs/16 §7) — its prerequisite, the
|
||||
`/apps?q=` deep link, **shipped in v1.1** (`src/lib/urlstate.ts`).
|
||||
2. ~~**VirusTotal automation — deadline 2027-01-26.**~~ **Done 2026-10-23
|
||||
(D30, docs/12 §4b):** `vt-recheck.yml` re-scans every check older than
|
||||
90 days daily, inside the Public API limits, into one accumulating
|
||||
signed-commit PR that dispatches `ci.yml`/`codeql.yml`; a detection drops
|
||||
`clean` to `unverified` and opens an issue (a confirmed one goes through
|
||||
`pnpm quarantine`, never deletion); dispatched on a data branch it scans a
|
||||
PR's new entries first. The drifted scans turned out to be 8, not ~11
|
||||
(dosbox-staging, forklift, netbird, nomacs, unity scanned an earlier
|
||||
link; beeper, spyder, nextcloud-desktop a trailing-slash variant) — the
|
||||
other six suspected ones were `#fragment` links, which VirusTotal drops.
|
||||
3. **Install-command snippets** — optional `install.winget` /
|
||||
`install.brew` fields rendered as copy buttons.
|
||||
4. **Favorites** — localStorage star + "my list" view (stays static).
|
||||
@@ -42,7 +73,11 @@ deploys handled by Cloudflare Workers Builds on push to `main` (docs/12 §3).
|
||||
EN/VI/JP baseline of PhantomMAC/IconForge.
|
||||
7. **Community data automation** — app_request issues auto-drafting data
|
||||
PRs for maintainer review.
|
||||
8. Playwright smoke pack if island count grows past six.
|
||||
8. ~~Playwright smoke pack if island count grows past six.~~ **Done in
|
||||
v1.1** without the island count changing — the bugs that shipped were
|
||||
CSP refusals, dialogs and overflow only a real browser shows (docs/11
|
||||
§5). Still open from the quality bar: Lighthouse CI and a `size-limit`
|
||||
budget (docs/13 §2).
|
||||
9. **Grid pagination — triggered by size, not by date.** `/apps` server-renders
|
||||
every card and filters by toggling `hidden` (docs/05 §A3), which is what
|
||||
keeps the no-JS experience whole. That trade stops paying somewhere around
|
||||
@@ -51,7 +86,52 @@ deploys handled by Cloudflare Workers Builds on push to `main` (docs/12 §3).
|
||||
(docs/00 §2.5). **Trigger:** when the dataset passes 250 apps, or `/apps`
|
||||
HTML passes 200 KB gzip, paginate or virtualize — and keep a full
|
||||
unpaginated listing reachable for no-JS users. Revisit before the count
|
||||
gets there, not after.
|
||||
gets there, not after. *Re-measured 2026-10-21 on a local v1.1 build:
|
||||
`/apps` 119.0 KB gzip (~1.24 MB raw), `/vi/apps` 125.3 KB — up from
|
||||
112.2 / 116.9 KB on 2026-07-29, still inside the 200 KB budget; cards
|
||||
use `content-visibility: auto` so off-screen ones cost no layout.*
|
||||
10. ~~**Catalogue batch 2 (~40 apps).**~~ **Done 2026-10-23 (D31): 38 apps,
|
||||
categories `ai-local` and `cad-3d`; 30 promoted to `clean` by the owner
|
||||
after the VirusTotal preview, 8 held `unverified`.** The candidate list,
|
||||
as planned: Windows: PowerToys,
|
||||
ShareX, Flameshot, Greenshot, AutoHotkey, Ditto, Bulk Crap
|
||||
Uninstaller, EarTrumpet, Twinkle Tray, Scoop, WinGet, PowerShell 7;
|
||||
sharing/remote: LocalSend, KDE Connect, RustDesk, Parsec; hashing:
|
||||
OpenHashTab, QuickHash GUI; macOS: Maccy, AltTab, MonitorControl, Ice,
|
||||
Karabiner-Elements, Shottr; gaming: Prism Launcher, Lossless Scaling,
|
||||
DuckStation, Azahar, ReShade; dev: Fork, Docker Desktop, Insomnia,
|
||||
Kitty, Tabby; local AI: LM Studio, Jan, GPT4All; CAD/3D: KiCad,
|
||||
OpenSCAD, PrusaSlicer, OrcaSlicer, Cura, LibreCAD. Each passes C1–C7
|
||||
on its own (Docker Desktop needs a C3 ruling — paid for larger
|
||||
companies); possible new categories `ai-local` and `cad-3d`. New slugs
|
||||
enter `/rss.xml`, so notify.py announces each one once — expected.
|
||||
The one-app-per-PR rule (docs/03 §1) applies unless a batch exemption
|
||||
is logged like D24.
|
||||
11. **Data hygiene.** SPDX-normalise `license`, consolidate `tags` (663
|
||||
distinct, 68 % used once), unify developer names, record the missing
|
||||
C3 rulings — fixed in the data, then held by `validate-data.mjs`
|
||||
rules so they stay fixed.
|
||||
12. **Install-command generator** (extends item 3): optional
|
||||
`install.{winget,scoop,choco,brew,flatpak}` fields, a copy button per
|
||||
app, and a multi-select on `/apps` that builds ONE combined command —
|
||||
entirely client-side, no new island if it can live in ShSearch's grid
|
||||
controller.
|
||||
13. **Collections** — curated static lists ("Fresh Windows install",
|
||||
"Privacy", "Creator", "Dev setup") from a `collections.json`, each a
|
||||
page in both locales.
|
||||
14. **"Free alternatives to X" pages** — an optional `alternativeTo` field
|
||||
and static landing pages; useful for search, honest only while every
|
||||
listed alternative still passes C1–C7.
|
||||
15. **Anonymous app-suggestion form** — reuses `/api/verify` + Turnstile;
|
||||
the Worker files a GitHub issue with a fine-grained token (runtime
|
||||
secret), rate-limited like D25. A second Worker route, so it needs its
|
||||
own decision-log entry under hard rule 1.
|
||||
16. **Platform upkeep** — ~~Node 26 together with `.nvmrc`, `engines` and
|
||||
the `@types/node` major~~ **done 2026-10-23 (D28)**; TypeScript 7
|
||||
**partly done** — it type-checks every `.ts` file beside the TS 6 API
|
||||
that `astro check` still needs (D28; a TS 7-only setup waits on Astro
|
||||
#18471 and typescript-eslint #10940); still open: an OpenSearch
|
||||
description, a versioned `/api/v1` with a published JSON Schema.
|
||||
|
||||
## 3. Explicitly rejected (for the record)
|
||||
|
||||
@@ -76,7 +156,7 @@ rule 8) · ads/affiliate links (conflicts with the trust proposition).
|
||||
| 2026-07-15 | Fonts: **Bricolage Grotesque** chosen over Space Grotesk for display | ⚠ review (D9) |
|
||||
| 2026-07-15 | Added **nanostores** as the one cross-island state dep | ⚠ review (D15) |
|
||||
| 2026-07-15 | Legal drafts embedded in docs/14; split into `/legal/*` pages at implementation | ⚠ review |
|
||||
| 2026-07-15 | No analytics in v1 | ✅ from spec session |
|
||||
| 2026-07-15 | No analytics in v1 | ⛔ superseded 2026-10-21 (D26) |
|
||||
| 2026-07-15 | Category taxonomy fixed at 12 ids (docs/04 §4) | ⚠ review |
|
||||
| 2026-07-20 | **`softharbor.net` purchased**; docs suite → v1.1; new docs/16 owns domain/SEO ops | ✅ Kokone |
|
||||
| 2026-07-20 | Canonical = apex `https://softharbor.net`; `www` 301 via zone Redirect Rule; **no auto-anything else** | ⚠ review (N1–N2) |
|
||||
@@ -84,16 +164,16 @@ rule 8) · ads/affiliate links (conflicts with the trust proposition).
|
||||
| 2026-07-20 | Zone plan **Free**; Custom Errors therefore unavailable; `/errors/*` stay dormant | ✅ (plan-gating re-verified) |
|
||||
| 2026-07-20 | Rate limiting + Bot Fight Mode deliberately OFF at launch (recipes in docs/16 §9) | ⚠ review (N6) |
|
||||
| 2026-07-20 | HSTS zone-level, phased P1→P2→optional P3 preload (H9 = Kokone's call) | ⚠ review (N5) |
|
||||
| 2026-07-20 | Contact = `contact@softharbor.net` via Email Routing; SPF + DMARC quarantine→reject | ⚠ review (N7) |
|
||||
| 2026-07-20 | Contact = `contact@softharbor.net` via Email Routing; SPF + DMARC quarantine→reject | ⛔ superseded 2026-10-21 (D27) |
|
||||
| 2026-07-20 | SEO additions: GSC Domain property, Bing import, Crawler Hints/IndexNow ON, JSON-LD `SoftwareApplication` + `BreadcrumbList` (price only for `free`) | ⚠ review (N8) |
|
||||
| 2026-07-27 | **Suite audit → v1.2.** Six build/deploy blockers fixed before any code was written (below) | ✅ |
|
||||
| 2026-07-27 | CI called `reusable-node-ci.yml` and `reusable-notify.yml` — **neither exists** in `poli0981/.github`. Rewired to `reusable-web-react.yml` (generic Node, accepts pnpm) + a local `gates` job, and `announce-release.yml` (Discord-only) | ✅ (verified via `gh`) |
|
||||
| 2026-07-27 | CI called `reusable-node-ci.yml` and `reusable-notify.yml` — **neither exists** in `poli0981/.github`. Rewired to `reusable-web-react.yml` (generic Node, accepts pnpm) + a local `gates` job, and `announce-release.yml` (Discord-only) | ⛔ superseded 2026-07-28 (self-contained `ci.yml`) |
|
||||
| 2026-07-27 | **D16** `developer` required in schema + rendered (docs/04 §2 documented a field the `.strict()` schema rejected) | ⚠ review |
|
||||
| 2026-07-27 | **D18** CSP: zero inline scripts, `script-src 'self'`, no hash pipeline; theme → `public/theme.js` | ⚠ review — **S1 must confirm ClientRouter survives** |
|
||||
| 2026-07-27 | **D18** CSP: zero inline scripts, `script-src 'self'`, no hash pipeline; theme → `public/theme.js` | ⛔ superseded 2026-07-27 (D20) |
|
||||
| 2026-07-27 | Card markup: wrapping `<a>` with nested chip links replaced by the stretched-link pattern (nested anchors are invalid HTML) | ✅ |
|
||||
| 2026-07-27 | VI glossary moved out of `vi.json` into docs/07 §9 — a `_glossary` key would fail the strict parity check it was meant to serve | ✅ |
|
||||
| 2026-07-27 | Search index stores **raw** fields; `processTerm` normalizes both sides. No `*Norm` copies, no `storeFields` | ✅ |
|
||||
| 2026-07-27 | `fuzzy: 0.15` marked provisional — the declared `gmip → GIMP` vector needs ~2 edits and cannot pass. **S2 owns the final value** | ⚠ open |
|
||||
| 2026-07-27 | `fuzzy: 0.15` marked provisional — the declared `gmip → GIMP` vector needs ~2 edits and cannot pass. **S2 owns the final value** | ⛔ superseded 2026-07-27 (D22) |
|
||||
| 2026-07-27 | **D17** pnpm 10 kept despite npm siblings | ✅ |
|
||||
| 2026-07-27 | Toolchain majors corrected against `poli0981-dev`: TypeScript 6, ESLint 10, lefthook 2, knip 6 | ✅ (verified) |
|
||||
| 2026-07-27 | Action pins bumped to `checkout@v7` / `setup-node@v6` / `pnpm/action-setup@v6`; SHA-pinning rule scoped to repo-local workflows | ✅ |
|
||||
@@ -103,13 +183,13 @@ rule 8) · ads/affiliate links (conflicts with the trust proposition).
|
||||
| 2026-07-27 | **P1/M0 executed.** Scaffold builds; S1 and S2 passed; findings below | ✅ |
|
||||
| 2026-07-27 | **B7 / D15 amended** — `@nanostores/svelte` **does not exist** (registry 404). Not needed: nanostores atoms satisfy Svelte's store contract natively | ✅ (verified) |
|
||||
| 2026-07-27 | **D20 supersedes D18** — Astro island hydration emits inline scripts, so "nothing inline" is unachievable. CSP split: Astro `security.csp` meta owns script-src/style-src with generated hashes; `_headers` owns only `frame-ancestors` | ✅ (S1, hashes re-verified) |
|
||||
| 2026-07-27 | ClientRouter is an **external** script — View Transitions survive. The M1 fallback risk is closed | ✅ (S1) |
|
||||
| 2026-07-27 | ClientRouter is an **external** script — View Transitions survive. The M1 fallback risk is closed | ⛔ superseded 2026-10-21 (ClientRouter removed — native view transitions) |
|
||||
| 2026-07-27 | **D21** hold TypeScript at 6.x — TS 7's native compiler breaks `astro check` | ✅ (S1, reproduced) |
|
||||
| 2026-07-27 | **D22** `FUZZY = 0.25`; `gmip → GIMP` vector retired as not worth its false positives | ✅ (S2, measured) |
|
||||
| 2026-07-27 | `ignore-scripts=true` removed — pnpm ≥ 10 blocks dep scripts by default; the flag also suppresses the `allowBuilds` allowlist and stops the build entirely. pnpm line corrected 10.x → 11.x | ✅ (S1) |
|
||||
| 2026-07-27 | Prettier ignores `docs/` + `CLAUDE.md` — the suite is hand-wrapped, and reformatting would bury every future docs diff | ✅ |
|
||||
| 2026-07-27 | **S4 passed**, catching two design bugs: a `transition:persist`ed `<dialog>` loses top-layer state across a swap (fixed by re-asserting `showModal()` on `astro:after-swap`), and a persisted island keeps its first `locale` prop, so EN copy leaked onto `/vi/` pages (fixed by deriving locale from the path) | ✅ |
|
||||
| 2026-07-27 | Island tests added in **happy-dom** (`vitest.config.ts`, two projects). Does **not** reopen the no-Playwright decision — asserts island state machines only; layout/top-layer/visual stay manual (docs/11 §1) | ⚠ review |
|
||||
| 2026-07-27 | **S4 passed**, catching two design bugs: a `transition:persist`ed `<dialog>` loses top-layer state across a swap (fixed by re-asserting `showModal()` on `astro:after-swap`), and a persisted island keeps its first `locale` prop, so EN copy leaked onto `/vi/` pages (fixed by deriving locale from the path) | ⛔ superseded 2026-10-21 (no ClientRouter; the gate mounts per page) |
|
||||
| 2026-07-27 | Island tests added in **happy-dom** (`vitest.config.ts`, two projects). Does **not** reopen the no-Playwright decision — asserts island state machines only; layout/top-layer/visual stay manual (docs/11 §1) | ⛔ superseded 2026-10-21 (Playwright e2e added) |
|
||||
| 2026-07-27 | Legal-gate session fallback moved from a module-local `let` to a `globalThis` key — its scope really is the session, and a module-local silently leaked acceptance between tests | ✅ |
|
||||
| 2026-07-27 | **M1 skeleton done** — tokens, self-hosted fonts, Base/header/footer, Welcome + empty grid in **both** locales, i18n helper + parity gate | ✅ |
|
||||
| 2026-07-27 | `_headers` had a dead `/fonts/*` rule and the PWA a dead `fonts/*.woff2` glob: Astro hashes fonts into `/_astro/`, so the offline shell would have shipped **unstyled**. Both corrected (docs/08 D, docs/09 §4) | ✅ (found by inspecting `dist/`) |
|
||||
@@ -133,43 +213,43 @@ rule 8) · ads/affiliate links (conflicts with the trust proposition).
|
||||
| 2026-07-30 | Link check now accepts **403/429**. 14 of the 26 CI failures were bot mitigation on plainly-live sites (winehq, dolphin-emu, rpcs3, gitlab, MSI, Nexus, Epic, Enpass). A checker wrong about a seventh of the catalogue gets ignored, which costs more than the 403 it would eventually be right about. 404/500/connection failures still break the build. **Spoofing a browser `--user-agent` was tried first and is explicitly rejected**: it cleared the 403s but made gitlab.gnome.org answer 406 and whatsapp.com 400, both of which pass on lychee's default agent — no single UA suits every vendor, so it trades one false-positive set for another | ✅ |
|
||||
| 2026-07-30 | `security.evidence` was collected by the schema and demanded by docs/09 §6 but **rendered nowhere** — it had always been `null`, so the gap was invisible until 327 permalinks landed. The detail page's security line now links it (docs/06 §5, `detail.evidence`) | ✅ |
|
||||
| 2026-07-30 | **C3 rulings approved by H7** — the freemium entries below are confirmed acceptable as `free` | ✅ |
|
||||
| 2026-07-29 | **C3 rulings pending for the freemium communication entries** — Slack (90-day history), Zoom (40-min meetings), Microsoft Teams (60-min calls), Discord, Beeper, and eM Client (`free-onetime`, one device / two accounts) all enter as `free` on the grounds that the free tier is self-sufficient for desktop use. Each summary states its limit rather than hiding it. Hard rule 3 is satisfied — none is subscription-*only* — but docs/04 §3 wants the rulings logged, and these are H7's to confirm | ⚠ Kokone |
|
||||
| 2026-07-29 | **C3 rulings pending for the freemium communication entries** — Slack (90-day history), Zoom (40-min meetings), Microsoft Teams (60-min calls), Discord, Beeper, and eM Client (`free-onetime`, one device / two accounts) all enter as `free` on the grounds that the free tier is self-sufficient for desktop use. Each summary states its limit rather than hiding it. Hard rule 3 is satisfied — none is subscription-*only* — but docs/04 §3 wants the rulings logged, and these are H7's to confirm | ⛔ superseded 2026-07-30 (approved by H7) |
|
||||
| 2026-07-29 | Logo remaps refuse any Simple Icons name that is also a common word (`session`, `wire`, `mumble`, `element`, `line`, `signal`, `zoom`, and the earlier `shell`/`helium`/`dolphin`/`files`/`helix`/`wine`) unless the brand is confirmed against its upstream `source` URL. A wrong match ships another company's trademark, and docs/14 §3d has no room for that. Monogram is the safe default | ✅ |
|
||||
| 2026-07-27 | Page bodies live in `src/components/pages/*.astro`; `src/pages/**` are thin locale wrappers. Implements the docs/07 §2 no-duplication rule for whole pages, not just `getStaticPaths` | ✅ |
|
||||
| 2026-07-27 | i18n parity script also enforces **alphabetical key order** — a 200-key dictionary is unreviewable otherwise | ✅ |
|
||||
| 2026-07-27 | **S1 closed on a real deploy**: `build.format: 'file'` + `html_handling: 'drop-trailing-slash'`. The default pairing 307'd every canonical URL we advertise | ✅ (measured) |
|
||||
| 2026-07-27 | **S5 software passed**, 4 bugs: SW never registered (`@vite-pwa/astro` emits but never references `registerSW.js`); `navigateFallback` served the offline page to *online* visitors; `clientsClaim` false; workbox globs coupled to `build.format`. Device airplane-mode pass still outstanding | ✅ / ⚠ |
|
||||
| 2026-07-27 | **S3 partial**: `BUDGET = 5000`. GitHub 500s between ~7 160 and ~7 960 rather than degrading to 414, so 80 %-of-hard-limit would have landed inside the 500 band. Field-mapping check still needs the template on `main` | ✅ / ⚠ |
|
||||
| 2026-07-27 | Pre-launch `X-Robots-Tag: noindex` in `_headers` while the dataset is empty; removal is a launch-checklist item (docs/13 §2) | ✅ |
|
||||
| 2026-07-27 | Pre-launch `X-Robots-Tag: noindex` in `_headers` while the dataset is empty; removal is a launch-checklist item (docs/13 §2) | ⛔ superseded 2026-07-28 (header removed) |
|
||||
| 2026-07-27 | **`softharbor.net` is LIVE** — apex deployed, DNS + cert provisioned by `wrangler deploy`, M1 skeleton serving. **M0 and M1 complete** | ✅ |
|
||||
| 2026-07-27 | S5 re-verified on the production origin (SW controlling, 15 precache entries, no console errors). Airplane-mode device pass still outstanding | ✅ / ⚠ |
|
||||
| 2026-07-27 | `main` fast-forwarded to the feature branch so `bug_report.yml` reaches the default branch — GitHub reads issue templates only from there | ✅ |
|
||||
| 2026-07-28 | **M2 complete** — Zod schema (L1), `validate-data.mjs` (L2), `extract-urls.mjs` (L3), 12-category registry, 5 seed apps, card/grid/detail/category pages in both locales. 43 pages, deployed | ✅ |
|
||||
| 2026-07-28 | **The T4 `set:html` ban had never worked** — the hand-rolled selector targeted `JSXAttribute`, which astro-eslint-parser does not emit for template directives. Replaced with `astro/no-set-html-directive` and negative-controlled | ✅ |
|
||||
| 2026-07-28 | `unplugin-icons` is static-import-only and cannot resolve a data-driven `logo`. `src/lib/icon.ts` inlines from the same vendored Iconify JSON at build time; the T4 ban carries one carve-out scoped to three named files | ⚠ review |
|
||||
| 2026-07-28 | Seed entries enter as `security.status: "unverified"` — `clean` requires the docs/09 §6 checklist, and hard rule 4 forbids clean-by-default. Licenses/developers still need the L4 pass | ⚠ Kokone |
|
||||
| 2026-07-28 | Seed entries enter as `security.status: "unverified"` — `clean` requires the docs/09 §6 checklist, and hard rule 4 forbids clean-by-default. Licenses/developers still need the L4 pass | ⛔ superseded 2026-07-30 (vetting run) |
|
||||
| 2026-07-28 | Post-deploy edge propagation makes brand-new routes 404 intermittently for a minute or two; documented in docs/16 §10 so it is not mistaken for a config bug | ✅ |
|
||||
| 2026-07-28 | **M3 complete** — `/search-index.json`, nanostores, pure filter/sort in `src/lib/filter.ts`, `ShSearch` + `ShFilterSheet`. S2 vectors verified **in-app**; facets compose; no-JS grid intact | ✅ |
|
||||
| 2026-07-28 | **nanostores' `$name` convention is incompatible with Svelte** — `$` is reserved for auto-subscription, so atoms are exported unprefixed and referenced as `$name` in components (docs/05 §A3) | ✅ |
|
||||
| 2026-07-28 | Grid controller lives in `src/lib/grid.ts`, not a 7th island — docs/02 §5 caps islands at six. Reordering uses CSS `order`, never DOM moves | ✅ |
|
||||
| 2026-07-28 | Grid controller lives in `src/lib/grid.ts`, not a 7th island — docs/02 §5 caps islands at six. Reordering uses CSS `order`, never DOM moves | ✅ / ⛔ CSS-`order` part superseded 2026-07-30 (DOM moves) |
|
||||
| 2026-07-28 | All 5 seed entries share `addedAt`, so the "Newest" sort currently falls through to the name tiebreak. Correct, but it means sort order is only exercised by unit tests until entries land on different days | ⚠ note |
|
||||
| 2026-07-28 | **M4 complete** — legal gate copy moved into the dictionaries, 5 legal documents ×2 locales, `ShLangSwitch` + `ShThemeToggle`, `LICENSE-DATA.md`. Five of six islands now exist (`ShBugReport` is M5) | ✅ |
|
||||
| 2026-07-28 | **Regression caught in M4, introduced by the S1 trailing-slash fix**: `build.format: 'file'` makes `Astro.url.pathname` the emitted FILE name, so all 52 pages shipped `.html` canonicals and hreflangs that disagreed with the sitemap. Fixed via `canonicalPath()` (docs/07 §6) and pinned by tests | ✅ |
|
||||
| 2026-07-28 | Gate strings are passed to the island as props rather than importing `t` — the gate must switch locale without a reload, but importing the dictionaries would bundle all 78 keys into it | ✅ |
|
||||
| 2026-07-28 | Locale ROUTING split into `src/lib/locale.ts` (no dictionary import) so islands can use `localePair` without pulling in every string | ✅ |
|
||||
| 2026-07-28 | Legal drafts are published as written in docs/14. **H6 (Kokone's review) is still outstanding**, and `LEGAL_VERSION` should be reset to the approval date when it happens — bumping it re-opens the gate for everyone, which is the intended behaviour | ⚠ Kokone |
|
||||
| 2026-07-28 | Legal drafts are published as written in docs/14. **H6 (Kokone's review) is still outstanding**, and `LEGAL_VERSION` should be reset to the approval date when it happens — bumping it re-opens the gate for everyone, which is the intended behaviour | ⛔ superseded 2026-07-28 (H6 approved) |
|
||||
| 2026-07-28 | **M5 complete** — `/api/apps.json`, `/rss.xml`, `ShBugReport` (the 6th and final island), dormant `/errors/*`, 404/offline, `security.txt`, `SECURITY.md`, JSON-LD, favicon. **All six islands now exist**; a seventh needs a decision-log entry | ✅ |
|
||||
| 2026-07-28 | Feed determinism **verified by building twice and comparing hashes** — `/rss.xml` byte-identical, so notify.py cannot double-fire. `@astrojs/rss` has no `guid` option, so the slug guid is injected via `customData` (docs/05 §A4) | ✅ |
|
||||
| 2026-07-28 | Ring-buffer listeners moved OUT of `ShBugReport` into `public/errors.js`: the island is `client:visible` in the footer, so hydration-time listeners would have missed every error before the user scrolled (docs/05 §A5) | ✅ |
|
||||
| 2026-07-28 | `public/*.js` is now linted with browser globals rather than ignored — `theme.js` had been exempt | ✅ |
|
||||
| 2026-07-28 | **PNG PWA icons (192/512/maskable) still missing.** ⛔ superseded — Kokone chose to ship the existing SVG: manifest now uses `favicon.svg`, `sizes: "any"`, `purpose: "any maskable"`. Raster PNGs remain an optional upgrade | ✅ |
|
||||
| 2026-07-28 | **PNG PWA icons (192/512/maskable) still missing.** ⛔ superseded — Kokone chose to ship the existing SVG: manifest now uses `favicon.svg`, `sizes: "any"`, `purpose: "any maskable"`. Raster PNGs remain an optional upgrade | ⛔ superseded 2026-10-21 (PNG icons shipped) |
|
||||
| 2026-07-28 | **M6 complete** — CI/CD workflows, `quarantine.mjs`, renovate, CODEOWNERS, issue templates. Infra section of the launch checklist verified green against production | ✅ |
|
||||
| 2026-07-28 | **H6 approved.** `LEGAL_VERSION` set to 2026-07-28; everyone who accepted the pre-approval wording sees the gate once more, as intended | ✅ Kokone |
|
||||
| 2026-07-28 | **`X-Robots-Tag: noindex` removed.** It guarded against indexing an EMPTY site; with real entries, legal pages and a sitemap live that objection no longer holds | ✅ |
|
||||
| 2026-07-28 | **`www` was being deleted by `wrangler deploy`** — a hand-added DNS record is not in the Worker's trigger list, so deploys reconciled it away and the redirect died silently. Fixed by declaring `www.softharbor.net` as a second `custom_domain` so wrangler owns the record. **Redirect Rule R1 is now a hard prerequisite**: without it www would serve a duplicate of the site | ✅ (verified across a deploy) |
|
||||
| 2026-07-28 | **`www` was being deleted by `wrangler deploy`** — a hand-added DNS record is not in the Worker's trigger list, so deploys reconciled it away and the redirect died silently. Fixed by declaring `www.softharbor.net` as a second `custom_domain` so wrangler owns the record. **Redirect Rule R1 is now a hard prerequisite**: without it www would serve a duplicate of the site | ⛔ superseded 2026-07-28 (routes removed, commit 66c6255 — docs/16 §3) |
|
||||
| 2026-07-28 | Quarantine sweep tested end-to-end: a flagged entry vanishes from the detail page, grid, API export, RSS feed **and** search index — all five surfaces | ✅ |
|
||||
| 2026-07-28 | Dead-code sweep: `ShProbe.svelte` (a dead S1 leftover sitting in `islands/`, where docs/02 §5 caps the count at six), 5 unused exports, 2 `exactOptionalPropertyTypes` violations. `knip` now passes clean so the next one is visible | ✅ |
|
||||
| 2026-07-28 | **v1.0.0 NOT tagged.** Infra is green but the dataset is 5 of 32 entries and all are `unverified` — the docs/09 §6 checklist has not been run. Tagging now would rest hard rule 4's honesty claim on unchecked data | ⚠ Kokone |
|
||||
| 2026-07-28 | **v1.0.0 NOT tagged.** Infra is green but the dataset is 5 of 32 entries and all are `unverified` — the docs/09 §6 checklist has not been run. Tagging now would rest hard rule 4's honesty claim on unchecked data | ⛔ superseded 2026-07-30 (v1.0.0 tagged) |
|
||||
| 2026-07-28 | **CSP `style-src` was silently dropping every inline `style` attribute** — 49 of them. The sticky header rendered transparent and content bled through. Tokens are now Tailwind utilities and `check:styles` fails the build on any `style=` in dist (docs/09 §4) | ✅ |
|
||||
| 2026-07-28 | `ci.yml` made **self-contained**, superseding the reusable-workflow caller: `reusable-web-react.yml`'s Pages job declares `pages: write` + `id-token: write`, and a caller cannot grant less, so every run died at `startup_failure` — and its steps run only "if the script exists", which silently green-lights a renamed gate | ✅ |
|
||||
| 2026-07-28 | `reusable-codeql.yml` takes `languages` as a **JSON array string** (`'["javascript-typescript"]'`); a bare value throws in `fromJSON` and kills the run at startup | ✅ |
|
||||
@@ -180,63 +260,121 @@ rule 8) · ads/affiliate links (conflicts with the trust proposition).
|
||||
| 2026-10-21 | **D26 — Cloudflare Web Analytics, honouring Global Privacy Control** (supersedes "No analytics in v1"; amends hard rule 7). Cookieless beacon injected by `src/scripts/analytics.js` only when `navigator.globalPrivacyControl` is not set and the host is `softharbor.net` (never previews, localhost or e2e). CSP gains exactly `static.cloudflareinsights.com` (script), `cloudflareinsights.com` (connect) and `challenges.cloudflare.com` (script + frame, for D25) — nothing else third-party | ✅ (user, 2026-10-21) |
|
||||
| 2026-10-21 | **D27 — one contact address per purpose** at `poli0981.dev` (supersedes the `contact@softharbor.net` row of 2026-07-20): security, privacy, legal, dmca, takedown, copyright, code (CoC), press, collab — `src/lib/contacts.ts`. `sponsor@` deliberately unused: a neutral directory takes no paid placement. Mail is hosted by Google (MX), which the Privacy Policy now says | ✅ (user, 2026-10-21) |
|
||||
| 2026-10-21 | **`LEGAL_VERSION` → 2026-10-21** with per-document "Last updated" dates (`LEGAL_UPDATED`): Privacy covers D25/D26 and names the operator; Terms gain the operator and a copyright-complaint procedure (`dmca@`); nine EN/VI wording gaps and two false AI-Disclosure claims fixed. A test now fails if an accepted document is dated after the version | ✅ |
|
||||
| 2026-10-21 | **`<ClientRouter />` removed → native cross-document View Transitions.** Astro does not support ClientRouter together with `security.csp`, and in practice a soft navigation kept the *first* page's meta CSP, wiped `<html data-theme>` (theme flicker) and kept module state alive while islands reset (a stale sort). Every navigation is now a full document load. The opt-in is an inline, hashed `<style>` (`src/lib/inlineCss.ts`, hash supplied in `astro.config.ts`) because Chromium settles it when `<body>` is inserted; no `transition:persist`, no `astro:after-swap`; the URL holds the `/apps` view state (`src/lib/urlstate.ts`). Supersedes the S1 "View Transitions survive" and S4 rows (docs/02 §6) | ✅ |
|
||||
| 2026-10-21 | **Playwright + axe end-to-end, enforced in CI — reverses "No Playwright in v1"** (docs/11 §1). Desktop Chrome + Pixel 7 against `astro preview`; a test fails on any console error, uncaught exception, CSP violation or sideways overflow, and on serious/critical axe findings in light and dark; Turnstile is stubbed with `page.route`. Vitest grew to four projects (unit, islands, scripts — the real build scripts in temp trees — and worker) with a coverage ratchet of 93/78/90/93 | ✅ |
|
||||
| 2026-10-21 | **CSP-first head.** Head scripts moved from `public/` to `src/scripts/*.js`, imported with `?url&no-inline` (content-hashed, immutable `/_astro/` files); `errors.js` loads first and blocking — `defer` had made it miss early failures — and now also records CSP violations and hydration errors; `scripts/postbuild.mjs` moves the CSP meta right after `<meta charset>`. `check:styles` became **`check:csp`** (also fails on a missing meta, a script before it, an unhashed inline script); new `check:assets` catches `data:` scripts and missing assets | ✅ |
|
||||
| 2026-10-21 | **`_headers` Cache-Control repaired.** Cloudflare comma-JOINS a header set by several matching rules, so hashed assets were served `public, max-age=0, must-revalidate, public, max-age=31536000, immutable` — revalidated on every load — and the JSON feeds were never cached. `/*` now sets no Cache-Control and each specific rule detaches with `! Cache-Control`. PR preview hosts get `X-Robots-Tag: noindex` from an absolute-URL rule (docs/09 §4) | ✅ (verified live) |
|
||||
| 2026-10-21 | **Dependabot replaces Renovate**, which was never installed (no branch, dashboard or PR ever appeared). Weekly npm + github-actions, 2-day cooldown (pnpm 11's 24 h `minimumReleaseAge` failed same-day PRs #14/#15), minor+patch grouped, TypeScript (D21) and `@types/node` majors ignored. Every action pinned to a commit SHA with a version comment (docs/12 §6) | ✅ |
|
||||
| 2026-10-21 | **Squash is the only merge method.** The `main` ruleset ("Run") requires signed commits and linear history, and GitHub cannot sign a rebase merge. Required checks: `build`, `gates` and `codeql / Analyze (javascript-typescript)` — so CodeQL runs on PRs; a required check that never appears deadlocks merging (docs/12 §8) | ✅ |
|
||||
| 2026-10-21 | **Quarantine workflow hardened**: a PR opened with `GITHUB_TOKEN` triggers no workflows, so it dispatches `ci.yml` + `codeql.yml` on its branch; commits signed via the API; one tracking issue per slug, only if none is open; step outputs pass through `env:`. `pnpm quarantine` plus the `flagged-in-main-tree` rule make flag-and-move one PR (docs/12 §4) | ✅ |
|
||||
| 2026-10-21 | **`ShPrefs` display menu replaces `ShThemeToggle`** — theme, scrollbar (`sh:scrollbar`) and motion (`sh:motion`), all applied pre-paint by `theme.js`, plus the global `/` shortcut. A one-for-one swap: still six islands (docs/05 §A8) | ✅ |
|
||||
| 2026-10-21 | **Legal-gate exemptions are declared by the page** (`gateExempt`), not matched by path: the old regex never matched the real 404 (served at any URL) or the service worker's offline page. `/contact` is exempt too (docs/14 Part 2) | ✅ |
|
||||
| 2026-10-21 | **Search and sort repaired**: race-free (sequence numbers), "Clear all" clears the query too, view state in the URL, "Best match" while querying, MiniSearch by dynamic `import()`, and every name order — grid, category pages — through one pinned `Intl.Collator('en', base, numeric)` (a Czech-locale browser had reordered 81 cards); `/api/apps.json` sorted by slug in code-unit order (docs/05 §A2–A3) | ✅ |
|
||||
| 2026-10-21 | **Data rules enforced, not just promised**: the schema requires `evidence` for `clean`/`flagged` and real, non-future dates; `validate-data.mjs` adds a download-portal denylist, tracking parameters, punycode hosts, invisible/bidi characters, case-sensitive local logos, date order, quarantine-tree rules and a 180-day stale-check warning (docs/03 §2) | ✅ |
|
||||
| 2026-10-21 | **"Harbor" UI refresh** (docs/06): OKLCH chart-paper/night-harbour tokens, hairline `--sh-border` separate from `--sh-control`, soft shadows (the offset shadows are gone), WCAG AA for every token pair held by `contrast.test.ts`, dark mode with JS off. Lucide via `ShIcon.astro`; the `set:html` carve-out now lists five named files (was three) | ✅ |
|
||||
| 2026-10-21 | **PWA installable**: manifest linked, PNG icons (192/512/maskable) + apple-touch + favicon.ico from `pnpm icons`; the SW precaches what `/offline` loads — it had rendered unstyled — and calls `skipWaiting`; `check:sw` asserts both (docs/08 Part D) | ✅ |
|
||||
| 2026-10-21 | **`check:feed`** at the end of `pnpm build` asserts the emitted RSS — slug guids that name real apps, links, newest first, ≤ 50 items — because the `customData` guid seam is invisible to unit tests and notify.py announces every new guid (docs/05 §A4) | ✅ |
|
||||
| 2026-10-21 | **Recorded late: `routes` removed from `wrangler.jsonc`** (commit 66c6255, 2026-07-28). Both custom domains are attached in the dashboard; with no `routes` key a deploy leaves them untouched. Supersedes that day's "declare www as a second custom_domain" row; a Worker re-created from a fresh clone needs both re-attached (docs/16 §3) | ✅ |
|
||||
| 2026-10-21 | **Workers Builds runs one build at a time.** A `main` merge can wait ~20 minutes behind PR builds, a superseded queued `main` build may be skipped (`ff95578` never deployed; `3743cfb` did), and the "Workers Builds" check appears on a commit only once its build starts. A gap in `wrangler deployments list` only means nothing reached `main`. New release step: wait for that check to go green, then verify production (assets, headers, `/api/verify`, RSS); never `wrangler deploy` by hand while builds are queued (docs/13 §3) | ✅ |
|
||||
| 2026-10-21 | **Recorded late: v1.0.0 tagged and released on 2026-07-30** — 326 apps, 320 `clean`, 6 `unverified`. Supersedes the 2026-07-28 "v1.0.0 NOT tagged" row | ✅ |
|
||||
| 2026-10-21 | **v1.1.0 tagged and released** after #23–#25 (merge 2c40baf: `Workers Builds: softharbor`, `build`, `gates`, `codeql` green; production checked — `/contact`, the v1.1 CSP meta, single immutable `Cache-Control`, `/api/verify` answering from the Worker with the runtime secret set) | ✅ |
|
||||
| 2026-10-21 | **Suite v2.0** (site v1.1) — a MAJOR bump by §6's rule, because D25/D26 amend hard rules 1 and 7: docs/00–16 brought in line with the code — D25–D27, the rows above, superseded statuses marked; claims that could not be checked from the repository or a live probe are marked "⚠ verify" | ✅ |
|
||||
| 2026-10-23 | **D28 — Node 26, and TypeScript 6 and 7 side by side** (amends D7, D21). `.nvmrc` `26`, engines `>=26 <27`, `@types/node` 26 — five days before Node 26's LTS promotion (2026-10-28), at the owner's request; Node 24 had entered maintenance on 2026-10-20. TypeScript follows Microsoft's documented pair: `typescript` → `npm:@typescript/typescript6` (re-exports TS 6.0.3: the API `astro check`'s language server asserts, typescript-eslint's project service and svelte2tsx load) and `@typescript/native` → `npm:typescript@7` (bin `tsc`). `pnpm check` is now `astro check && tsc --noEmit` — and that second half is the first type-check `.ts` files ever had: astro check reports `.astro` diagnostics only. Node 25+ ships no Corepack, so laptops reinstall it (`npm i -g corepack`) and Workers Builds downloads Node 26 per build (`PNPM_VERSION` is the fallback) | ✅ (owner, 2026-10-23) |
|
||||
| 2026-10-23 | **D29 — SonarQube Cloud: CI-based analysis with coverage**, replacing Automatic Analysis (which cannot import coverage and must stay off). `ci.yml` job `sonar`, not a required check; `sonar-project.properties` replaces `.sonarcloud.properties`; `sonarqube-scan-action` 8.3 with the newest CLI (8.2); `sonar.projectVersion` from `package.json` so the "previous version" new-code period finally has a baseline (every analysis until now was "not provided"). Coverage now measures what Sonar analyses instead of excluding it: the build scripts through Vitest 5's `autoAttachSubprocess` (their child-process runs count), the head scripts, the endpoints and the schema through new tests — ratchet 93/78/90/93 → **96/85/95/97**. The schema tests caught a real bug: an impossible or malformed date made `toISOString()` throw, crashing `astro build` with a bare RangeError instead of naming the field | ✅ |
|
||||
| 2026-10-23 | **D30 — VirusTotal re-check, assisted not decided** (docs/09 §6 step 5; docs/12 §4b). `scripts/vt-recheck.mjs` + `vt-recheck.yml`: daily on `main`, checks older than 90 days are re-scanned (download page, VT API v3, 4/min, ≤ 440 of 500 requests a day) and only the three `security` lines change; `checkedAt` now means "latest scan" (docs/04, docs/09 §6). The bot never flags and never promotes on its own: a detection turns `clean` into `unverified` plus a `[vt] <slug>` issue, and `unverified` → `clean` happens only for slugs the maintainer passes as `promote`. Dispatched on a data branch it previews a PR's new entries as an artifact. Terms fit: the Public API is offered to sites free to consumers; SoftHarbor is free and ad-free and submits only public URLs. The site's own copy moved with it — the "no known warnings" note and the AI Disclosure now describe the re-scan (`LEGAL_UPDATED.aiDisclosure` 2026-10-23; `LEGAL_VERSION` unchanged) | ✅ (owner, 2026-10-23) |
|
||||
| 2026-10-23 | **D31 — Catalogue batch 2: 38 apps, two categories** (§2 item 10). Exempt from docs/03 §1's one-app-per-PR rule like D24 (38 researched entries, one PR). Categories `ai-local` and `cad-3d` (owner). **Not added:** Docker Desktop and Parsec — both free only under licence terms (Docker: not for larger companies; Parsec: personal, non-commercial use only), a C3 case the owner rules out; GPT4All and Ice — C5, unmaintained with open problems; QuickHash GUI — C4/C5, its only download site unreachable and no release since 2023. **C3 rulings:** LM Studio, Insomnia and RustDesk are `free` — the free tier serves the core purpose without a time limit and their subscriptions are optional add-ons (LM Studio's only for the separate Bionic agent's cloud models). **Store-only delivery meets C4** when the official download page on the developer's own domain hands off to the store (Lossless Scaling → Steam/Humble). **Licences as the sources grant them:** ShareX `GPL-2.0-or-later` (headers), KDE Connect `GPL-2.0-only OR GPL-3.0-only`, EarTrumpet `LicenseRef-EarTrumpet` (MIT plus an exclusion of three named companies), DuckStation `CC-BY-NC-ND-4.0` (source-available). Each entry was researched with AI assistance against docs/09 §6 steps 1–4 and scanned by the `vt-recheck` preview before merge (36 of 38 download pages with no detections); the owner reviewed the Vietnamese and promoted 30 to `clean`. Held `unverified`: Flameshot (unpatched advisory in its stable release), Bulk Crap Uninstaller (unsigned builds, antivirus history), OpenSCAD (2021 stable predates two CVE fixes), LM Studio (closed source, antivirus history), RustDesk (CVE backlog), AutoHotkey and LocalSend (one VirusTotal detection each), Lossless Scaling | ✅ (owner, 2026-10-23) |
|
||||
|
||||
## 5. Open questions for Kokone
|
||||
|
||||
Everything below is blocked on a decision or a setting, not on code. Ordered
|
||||
by what gates the v1.0.0 tag.
|
||||
Everything below is blocked on a decision or a setting, not on code.
|
||||
Status as of 2026-10-21: v1.0.0 shipped on 2026-07-30 and v1.1.0 on
|
||||
2026-10-21, so nothing here gates a tag any more; ordered by risk.
|
||||
|
||||
**Gating the launch**
|
||||
**Open — decisions**
|
||||
|
||||
1. **Seed and vet the remaining ~27 entries** (docs/13 §4, H7). This is the
|
||||
only real blocker: 5 of ~32 are in, and all 5 are `unverified` because
|
||||
`clean` requires the docs/09 §6 checklist per entry (reputation sweep +
|
||||
VirusTotal + `evidence` URL). Tagging v1.0.0 before that would rest hard
|
||||
rule 4's honesty claim on unchecked data. Also confirm any
|
||||
additions/removals — the current list leans Windows.
|
||||
2. **D16 naming convention for community projects** — "VSCodium contributors"
|
||||
vs "VSCodium Team". Answer once, or 32 entries will answer it 32 ways.
|
||||
3. **Launch announcement scope** — full notify.py fan-out, or soft-launch to
|
||||
Discord for a week of feedback first?
|
||||
1. **D16 naming convention for community projects** — "VSCodium contributors"
|
||||
vs "VSCodium Team". Answer once, or the catalogue answers it many ways.
|
||||
(Nothing in the repository records an answer — ⚠ verify.)
|
||||
2. **Sign-off on the 2026-10-21 legal rewrite** — Privacy, Terms, contacts,
|
||||
AI Disclosure. H6 approved the 2026-07-28 drafts; the rewrite is live with
|
||||
`LEGAL_VERSION` 2026-10-21 (docs/14 Part 4). ⚠ verify.
|
||||
3. **softharbor.net's Email Routing records** — no published address uses
|
||||
the domain since D27. Keep them (receive-only, harmless) or retire Email
|
||||
Routing and publish the non-sending set, `v=spf1 -all` + DMARC
|
||||
`p=reject` (docs/16 §6, H5).
|
||||
4. ~~**Suite numbering**~~ — resolved 2026-10-21: amending hard rules 1
|
||||
and 7 (D25, D26) is a *major* change by §6's own rule, so the suite is
|
||||
**2.0**, in CLAUDE.md and here alike.
|
||||
|
||||
**Repo settings (each is a silent failure until set)**
|
||||
**Open — settings (each is a silent failure until set)**
|
||||
|
||||
4. **Branch protection**: require **`ci / build` AND `ci / gates`** as required
|
||||
checks. Naming only the workflow leaves the gates job unenforced.
|
||||
5. **H10** — Settings → Actions → General → *Allow GitHub Actions to create and
|
||||
approve pull requests*, or the nightly quarantine sweep cannot open its PR
|
||||
(docs/12 §4).
|
||||
6. **Delete `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_ACCOUNT_ID`** — unused since
|
||||
deployment moved to Workers Builds (docs/12 §3).
|
||||
7. **GSC Domain property + Bing import + Crawler Hints** (docs/16 §8).
|
||||
5. **Speed Brain off** (H12) — production still sent `Speculation-Rules:
|
||||
"/cdn-cgi/speculation"` on 2026-10-21, and Cloudflare answers prefetch
|
||||
on Worker requests with a 503 (docs/16 §9).
|
||||
6. ~~**Delete `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_ACCOUNT_ID`**~~ — done:
|
||||
neither secret exists on 2026-10-23 (docs/12 §1).
|
||||
7. **GSC Domain property + sitemap + Bing import + Crawler Hints** (docs/16
|
||||
§8, H8) — the `google-site-verification` TXT is published (observed
|
||||
2026-10-21); the rest ⚠ verify.
|
||||
8. **H4** — GitHub private vulnerability reporting: `SECURITY.md`,
|
||||
`security.txt` and the issue-form config all route reports there.
|
||||
⚠ verify the setting.
|
||||
|
||||
**Live but off-spec — decide whether to reconcile**
|
||||
|
||||
8. **HSTS is already at phase P3 (`preload`)**, skipping the staged P1→P2
|
||||
burn-in docs/16 §5 designed. It works; `preload` is semi-irreversible, so
|
||||
this is now a "keep and update the doc" call rather than a go/no-go.
|
||||
9. **DMARC is `p=none`** (Cloudflare's auto record), not the `p=quarantine`
|
||||
docs/16 §6 specifies.
|
||||
10. Raster PWA icons (192/512/maskable) remain an optional upgrade — the
|
||||
manifest ships `favicon.svg` with `sizes: "any"`, per your call.
|
||||
9. **HSTS is already at phase P3 (`preload`)** — observed again on
|
||||
2026-10-21 — skipping the staged P1→P2 burn-in docs/16 §5 designed. It
|
||||
works; `preload` is semi-irreversible, so this is now a "keep and update
|
||||
the doc" call rather than a go/no-go. Whether the domain was submitted
|
||||
to hstspreload.org: ⚠ verify.
|
||||
10. **DMARC is `p=quarantine`** (observed 2026-10-21); docs/16 §6's planned
|
||||
tightening to `p=reject` has not happened.
|
||||
|
||||
**Closed**
|
||||
|
||||
11. ~~Accent hue~~ — harbor blue `oklch(0.52 0.11 235)` shipped in M1 tokens.
|
||||
11. ~~Accent hue~~ — harbor blue `oklch(0.52 0.11 235)` shipped in M1 tokens;
|
||||
the v1.1 refresh re-tuned it to `oklch(0.5 0.13 245)` (light) and
|
||||
`oklch(0.77 0.11 230)` (dark) under the contrast test (docs/06 §2).
|
||||
12. ~~**D18 / S1 blocking risk** — View Transitions under a strict CSP.~~
|
||||
**Closed 2026-07-27 by S1:** ClientRouter compiles to an external script,
|
||||
so View Transitions are safe. The real constraint was island hydration,
|
||||
handled by D20.
|
||||
handled by D20. (ClientRouter itself was removed on 2026-10-21 for
|
||||
native cross-document transitions — docs/02 §6.)
|
||||
13. ~~**S3 and S5 blocked on H1/H2/H3.**~~ Closed 2026-07-28 — both ran against
|
||||
the live origin.
|
||||
14. ~~**Seed and vet the remaining entries**~~ — closed 2026-07-30: 326 apps,
|
||||
320 `clean`, 6 `unverified`, every scan linked; v1.0.0 tagged.
|
||||
15. ~~**Launch announcement scope**~~ — moot: v1.0.0 launched on 2026-07-30.
|
||||
Tagged releases reach Discord through `notify.yml`; per-app posts are
|
||||
notify.py's, outside this repository.
|
||||
16. ~~**Branch protection**~~ — the ruleset "Run" requires `build`, `gates`
|
||||
and `codeql / Analyze (javascript-typescript)`, signed commits and linear
|
||||
history (docs/12 §8).
|
||||
17. ~~**H10**~~ — enabled; the quarantine sweep relies on it (docs/12 §4).
|
||||
18. ~~**DMARC is `p=none`**~~ — it reads `p=quarantine` now (item 10 tracks
|
||||
`p=reject`).
|
||||
19. ~~Raster PWA icons~~ — shipped in v1.1 (docs/08 Part D).
|
||||
20. ~~**`TURNSTILE_SECRET`**~~ — set; verified 2026-10-21 (`/api/verify`
|
||||
answers a junk token with `403 rejected`, not `503 not_configured`).
|
||||
|
||||
## 6. Suite maintenance
|
||||
|
||||
This suite (v1.2, 2026-07-27 — v1.1 was 2026-07-20 post-domain; v1.0 was
|
||||
2026-07-15, pre-domain) is the contract. Any implementation that
|
||||
diverges updates the relevant doc **in the same PR** (docs/10 §7-8). Version
|
||||
bumps: minor for clarifications, major when a hard rule or locked decision
|
||||
changes.
|
||||
This suite (**v2.0, 2026-10-21, describing site v1.1** — v1.2 was
|
||||
2026-07-27; v1.1 was 2026-07-20 post-domain; v1.0 was 2026-07-15,
|
||||
pre-domain) is the contract. Mind the two numbering schemes: *suite* v1.1
|
||||
is the July domain revision, *site* v1.1 is the October release. Any
|
||||
implementation that diverges updates the relevant doc **in the same PR**
|
||||
(docs/10 §7-8). Version bumps: minor for clarifications, major when a hard
|
||||
rule or locked decision changes — v2.0 is major because it amends hard
|
||||
rules 1 and 7.
|
||||
|
||||
**v2.0 caught the docs up with site v1.1** — the code had moved for three
|
||||
months while the suite stood still. D25–D27 and the 2026-10-21 rows of §4
|
||||
record what changed; superseded rows are marked in their Status cell only
|
||||
(the log stays append-only); every page of the suite was re-read against
|
||||
the repository, and against live DNS and response headers where a claim
|
||||
was about the platform (D19). What neither could settle is marked
|
||||
"⚠ verify" rather than guessed.
|
||||
|
||||
**v1.2 was a correctness pass, not a feature pass** — no hard rule and no
|
||||
pre-existing locked decision changed; six blockers, ten high-severity
|
||||
|
||||
+135
-61
@@ -4,7 +4,9 @@
|
||||
> everything zone-level: DNS, redirects, TLS/HSTS, email, robots/sitemap,
|
||||
> structured data, Search Console, and the features we deliberately keep
|
||||
> off. Platform facts below (plan gating, config keys) were re-verified
|
||||
> against Cloudflare docs on 2026-07-20.
|
||||
> against Cloudflare docs on 2026-07-20. **DNS records and response headers
|
||||
> were re-observed on 2026-10-21** (`nslookup`, `curl -I`) for suite v2.0 —
|
||||
> anything that could only be seen in the dashboard is marked ⚠ verify.
|
||||
>
|
||||
> Timing note: the domain arrived **before launch** — nothing is indexed on
|
||||
> `workers.dev`, so there is no migration, no legacy 301s, no Search Console
|
||||
@@ -20,7 +22,7 @@
|
||||
| N4 | Zone plan | **Free** (Workers Paid is account-level and unrelated). Consequence: Cloudflare **Custom Errors stays unavailable** (paid-zone feature) → our `/errors/*` templates remain dormant |
|
||||
| N5 | HSTS | Zone-level, phased rollout (§5) — **not** in `_headers` |
|
||||
| N6 | Rate limiting & Bot Fight Mode | **OFF** at launch, with a ready-made activation recipe (§9) |
|
||||
| N7 | Contact email | `contact@softharbor.net` via Cloudflare Email Routing (§6) — resolves H5 |
|
||||
| N7 | Contact email | ~~`contact@softharbor.net` via Cloudflare Email Routing (§6) — resolves H5~~ — ⛔ **superseded 2026-10-21 by D27**: one address per purpose at `@poli0981.dev`, mail hosted by Google (§6) |
|
||||
| N8 | Search plumbing | GSC **Domain property** + sitemap; Bing via GSC import; Crawler Hints (IndexNow) ON |
|
||||
|
||||
## 2. Zone, registrar & DNS
|
||||
@@ -42,11 +44,11 @@
|
||||
|
||||
| Type | Name | Content | Proxy | Purpose |
|
||||
|---|---|---|---|---|
|
||||
| *(auto)* | `softharbor.net` | Worker custom domain | ☁️ | created by `wrangler deploy` (§3) — do not hand-edit |
|
||||
| *(auto)* | `www` | Worker custom domain | ☁️ | **Declared in `wrangler.jsonc` routes, not added by hand.** A hand-made `AAAA www → 100::` placeholder works until the next `wrangler deploy` reconciles the Worker's triggers and removes it — the redirect then dies silently (observed 2026-07-28). Letting wrangler own the record makes it survive deploys and reproduce from a fresh clone. **Prerequisite: rule R1 (§4) must exist, or www would serve a duplicate of the site instead of redirecting.** |
|
||||
| MX ×3 + TXT (SPF) | `@` | added by Email Routing wizard | — | §6 |
|
||||
| TXT | `_dmarc` | §6 policy | — | anti-spoofing |
|
||||
| TXT | `@` | `google-site-verification=…` | — | GSC Domain property (§8) |
|
||||
| *(auto)* | `softharbor.net` | Worker custom domain | ☁️ | created when the custom domain was attached to the Worker (§3) — do not hand-edit |
|
||||
| *(auto)* | `www` | Worker custom domain | ☁️ | **Attached as a Worker Custom Domain in the dashboard** (Workers & Pages → softharbor → Domains), like the apex. History: a hand-made `AAAA www → 100::` placeholder was removed by the next `wrangler deploy`, which reconciles the Worker's triggers — the redirect then died silently (observed 2026-07-28). The fix that day was to declare both domains in `wrangler.jsonc` `routes`; later the same day (commit 66c6255) the routes were removed again and the domains attached in the dashboard instead — with **no** `routes` key, a deploy leaves the triggers untouched. A fresh clone therefore needs both re-attached by hand. **Prerequisite: rule R1 (§4) must exist, or www would serve a duplicate of the site instead of redirecting.** |
|
||||
| MX ×3 + TXT (SPF) | `@` | Cloudflare Email Routing: `route1/2/3.mx.cloudflare.net`; `v=spf1 include:_spf.mx.cloudflare.net ~all` | — | Still published (observed 2026-10-21) although no published address uses softharbor.net since D27 — keep or retire, §6 |
|
||||
| TXT | `_dmarc` | `v=DMARC1; p=quarantine; rua=…` (Cloudflare DMARC Management + the maintainer's inbox) | — | anti-spoofing — `p=quarantine` observed 2026-10-21 (§6) |
|
||||
| TXT | `@` | `google-site-verification=…` | — | GSC Domain property (§8) — present (observed 2026-10-21) |
|
||||
|
||||
No other records. CAA is optional hardening — if added, it must include
|
||||
every CA Cloudflare Universal SSL may use (check their current CA list at
|
||||
@@ -60,36 +62,45 @@ Universal SSL: automatic (nothing to do). Edge Certificates: **Minimum TLS
|
||||
terminates at the edge; there is no origin), relevant only if other records
|
||||
ever appear.
|
||||
|
||||
## 3. Attaching the Worker (IaC-first)
|
||||
## 3. Attaching the Worker (dashboard custom domains)
|
||||
|
||||
`wrangler.jsonc` delta (full file reference: docs/02 §7):
|
||||
*Originally IaC-first: the domains were declared as `routes` with
|
||||
`custom_domain: true` so a fresh clone would reproduce production. Reversed
|
||||
on 2026-07-28 (commit 66c6255) after a deploy's trigger reconciliation cost
|
||||
the `www` record (§2.2).* Today `wrangler.jsonc` (full reference: docs/02
|
||||
§7) declares **no `routes`**:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"name": "softharbor",
|
||||
"compatibility_date": "2026-07-15",
|
||||
"assets": { "directory": "./dist", "not_found_handling": "404-page" },
|
||||
"routes": [
|
||||
{ "pattern": "softharbor.net", "custom_domain": true },
|
||||
// www is declared so wrangler owns its DNS record and a deploy cannot
|
||||
// delete it (§2.2). Redirect Rule R1 (§4) keeps it from serving the site.
|
||||
{ "pattern": "www.softharbor.net", "custom_domain": true }
|
||||
],
|
||||
"main": "./worker/index.ts", // D25 — /api/verify only
|
||||
"compatibility_date": "2026-10-01",
|
||||
"assets": { "directory": "./dist", "binding": "ASSETS",
|
||||
"not_found_handling": "404-page",
|
||||
"html_handling": "drop-trailing-slash",
|
||||
"run_worker_first": ["/api/verify"] },
|
||||
// No "routes": softharbor.net and www.softharbor.net are Custom Domains
|
||||
// attached in the dashboard; with no routes key a deploy leaves them be.
|
||||
"workers_dev": false, // kills softharbor.<account>.workers.dev
|
||||
"preview_urls": true // explicit — defaults to workers_dev's value
|
||||
}
|
||||
```
|
||||
|
||||
`wrangler deploy` then creates the apex DNS record and provisions the
|
||||
certificate; the custom domain appears under the Worker's *Domains &
|
||||
Routes*. Keep the route in config (not clicked in the dashboard) so a fresh
|
||||
clone reproduces production exactly.
|
||||
Both hostnames are attached under the Worker's *Domains & Routes*
|
||||
(Workers & Pages → softharbor → Domains); attaching a custom domain
|
||||
creates its DNS record and certificate. The price of the reversal: a Worker
|
||||
re-created from a fresh clone does **not** get its domains back from the
|
||||
config — re-attach `softharbor.net` and `www.softharbor.net` by hand
|
||||
(R1 must exist first), then set the runtime secret (docs/08 Part E).
|
||||
|
||||
Preview URLs after this change: PR previews keep working at
|
||||
Preview URLs: PR previews keep working at
|
||||
`<version-prefix>-softharbor.<account>.workers.dev`. They are unlinked,
|
||||
short-lived, and carry no sitemap — indexing risk accepted (a static
|
||||
`_headers` file cannot vary `X-Robots-Tag` by host). Never link a preview
|
||||
URL anywhere public except the PR comment.
|
||||
short-lived, carry no sitemap, and since v1.1 send **`X-Robots-Tag:
|
||||
noindex`**: `_headers` supports absolute-URL patterns with placeholders,
|
||||
and the rule `https://:version.:subdomain.workers.dev/*` matches preview
|
||||
hosts and never the production domain (docs/09 §4). Their canonicals point
|
||||
at softharbor.net anyway. Never link a preview URL anywhere public except
|
||||
the PR comment.
|
||||
|
||||
## 4. Redirects
|
||||
|
||||
@@ -97,7 +108,7 @@ URL anywhere public except the PR comment.
|
||||
|---|---|---|
|
||||
| Zone **Redirect Rules** (run before the Worker, all plans) | R1 below | host-level: `www` → apex |
|
||||
| **Always Use HTTPS** | zone setting | `http://` → `https://` |
|
||||
| `public/_redirects` (static assets) | app | path-level only: future slug renames (docs/04 §2) — cannot match hosts |
|
||||
| `public/_redirects` (static assets) | app | path-level only: future slug renames (docs/04 §2) — cannot match hosts. Not present yet: no slug has ever been renamed |
|
||||
|
||||
**R1 — www to apex** (Rules → Redirect Rules → template *"Redirect from
|
||||
WWW to Root"* or manual):
|
||||
@@ -121,30 +132,62 @@ deliberately carries no HSTS (single source of truth, docs/09 §4).
|
||||
| P2 | +2 weeks, no TLS issues | `max-age=31536000` (1 year) |
|
||||
| P3 | +1 month, optional | add `preload` ✓ and submit at hstspreload.org — **semi-irreversible** (removal from browser preload lists takes months); Kokone's explicit call (docs/15 §5) |
|
||||
|
||||
**Observed 2026-10-21:** `Strict-Transport-Security: max-age=31536000;
|
||||
includeSubDomains; preload` on the apex — the zone is at **P3** already,
|
||||
skipping the staged burn-in (docs/15 §5 item 8). Whether the domain was
|
||||
also *submitted* to hstspreload.org: ⚠ verify.
|
||||
|
||||
## 6. Email on the domain (+ anti-spoofing)
|
||||
|
||||
**Current state (2026-10-21, D27).** The site no longer publishes any
|
||||
address on this domain. Every contact is **one address per purpose at
|
||||
`@poli0981.dev`** — `security@`, `privacy@`, `legal@`, `dmca@`,
|
||||
`takedown@`, `copyright@`, `code@`, `press@`, `collab@` (table: docs/14
|
||||
Part 2; source: `src/lib/contacts.ts`) — and `security.txt` names
|
||||
`security@poli0981.dev`. Mail for `poli0981.dev` is **hosted by Google**:
|
||||
its MX records point at `aspmx.l.google.com` (+ `alt1`–`alt4`), observed
|
||||
2026-10-21. That is a different domain, whose DNS is managed outside this
|
||||
repository and outside this zone (its own DMARC read `p=none` on
|
||||
2026-10-21 — out of scope here). The Privacy Policy says mail is
|
||||
Google-hosted (`#email`). **This changes the original Email Routing plan
|
||||
below**: `contact@softharbor.net` is retired everywhere.
|
||||
|
||||
**What softharbor.net still publishes** (observed 2026-10-21): the Email
|
||||
Routing records — MX `route1/2/3.mx.cloudflare.net` and SPF
|
||||
`v=spf1 include:_spf.mx.cloudflare.net ~all` — and `_dmarc` at
|
||||
`p=quarantine`, reporting to Cloudflare's DMARC Management and the
|
||||
maintainer's inbox. Whether the old `contact@` route still forwards
|
||||
anywhere: ⚠ verify in the dashboard. Two coherent options, a decision
|
||||
rather than a cleanup (H5): **keep** the records (harmless, receive-only;
|
||||
DMARC still protects the name), or **retire** Email Routing and publish the
|
||||
non-sending-domain set — `v=spf1 -all` and DMARC `p=reject` — with no MX.
|
||||
Either way the domain sends nothing.
|
||||
|
||||
*Original plan (2026-07-20) — superseded by D27, kept for the record:*
|
||||
|
||||
**Receiving** — Cloudflare **Email Routing** (free): Email → Email Routing
|
||||
→ enable → verify the personal destination inbox → create address
|
||||
`contact@softharbor.net` → forward. The wizard writes the MX records and an
|
||||
SPF TXT (`v=spf1 include:_spf.mx.cloudflare.net ~all`). This resolves
|
||||
action item **H5**: update `<contact-email>` → `contact@softharbor.net` in
|
||||
docs/14 drafts and `security.txt` before launch.
|
||||
SPF TXT (`v=spf1 include:_spf.mx.cloudflare.net ~all`). This resolved
|
||||
action item **H5** at the time.
|
||||
|
||||
**Anti-spoofing** — add `_dmarc` TXT:
|
||||
`v=DMARC1; p=quarantine; rua=mailto:contact@softharbor.net; fo=1`
|
||||
→ after ~1 month of clean reports, tighten to `p=reject`.
|
||||
**Anti-spoofing** — add `_dmarc` TXT with `p=quarantine` and an `rua`
|
||||
reporting address → after ~1 month of clean reports, tighten to
|
||||
`p=reject`. (Live record: `p=quarantine`, above — the `p=reject` step has
|
||||
not been taken.)
|
||||
|
||||
**Sending** — the domain sends nothing in v1 (Email Routing is
|
||||
receive-only; replies go out from the personal mailbox). If a send-as setup
|
||||
(e.g. Gmail SMTP for `contact@`) is ever added, revisit SPF/DKIM/DMARC in
|
||||
the same PR — the current policy would junk such mail by design.
|
||||
**Sending** — the domain sends nothing (Email Routing is receive-only;
|
||||
replies go out from the personal mailbox). If a send-as setup is ever added
|
||||
for softharbor.net, revisit SPF/DKIM/DMARC in the same PR — the current
|
||||
policy would junk such mail by design.
|
||||
|
||||
## 7. On-page SEO
|
||||
|
||||
- **`site`**: `https://softharbor.net` in `astro.config.ts` — canonicals,
|
||||
hreflang (docs/07 §6), sitemap, RSS links, and OG URLs all derive from
|
||||
it. Grep the repo for `workers.dev` before launch; only §3's preview note
|
||||
should remain.
|
||||
it. Grep the repo for `workers.dev`: only deliberate mentions should
|
||||
remain — §3's preview note, the `_headers` preview `noindex` rule, the
|
||||
`wrangler.jsonc` comments, `CLAUDE.md` (docs/13 §2).
|
||||
- **`public/robots.txt`** (final):
|
||||
|
||||
```
|
||||
@@ -154,9 +197,11 @@ the same PR — the current policy would junk such mail by design.
|
||||
Sitemap: https://softharbor.net/sitemap-index.xml
|
||||
```
|
||||
|
||||
- **noindex surface:** `/offline` and `/errors/*` get
|
||||
- **noindex surface:** `/offline`, `/errors/*` **and `/404`** get
|
||||
`<meta name="robots" content="noindex">` (reachable but meaningless in
|
||||
SERPs). The 404 page needs nothing — its status code excludes it. Legal
|
||||
SERPs). The 404 used to rely on its status code, but `/404` requested
|
||||
directly is served with 200, so since v1.1 it carries the tag too. These
|
||||
single bilingual pages emit no hreflang alternates. Legal and contact
|
||||
pages stay indexable.
|
||||
**They must also be excluded from the sitemap**, via the `sitemap({ filter })`
|
||||
option in `astro.config.ts` (docs/02 §4). `noindex` alone is not enough:
|
||||
@@ -164,20 +209,24 @@ the same PR — the current policy would junk such mail by design.
|
||||
noindex"* on every crawl, which buries the hreflang errors we actually
|
||||
want to see (§8 monitoring cadence).
|
||||
- **Structured data (JSON-LD):**
|
||||
- `/apps/[slug]`: `SoftwareApplication` — `name`, `description`
|
||||
(locale summary), `operatingSystem` (joined platforms),
|
||||
- `/apps/[slug]` (`ShJsonLd.astro`): `SoftwareApplication` — `name`,
|
||||
`description` (locale summary), `operatingSystem` (joined platforms),
|
||||
`applicationCategory` (primary category label EN), `url` (the
|
||||
SoftHarbor page), `sameAs: [homepage, repo]`, and `offers { "@type":
|
||||
"Offer", "price": "0", "priceCurrency": "USD" }` **only when
|
||||
SoftHarbor page in that locale), `author` (an `Organization` named by
|
||||
the `developer` field), `sameAs: [homepage, repo]`, and `offers {
|
||||
"@type": "Offer", "price": "0", "priceCurrency": "USD" }` **only when
|
||||
`pricing === "free"`** — we never state amounts for `onetime`
|
||||
(truthfulness > rich-result greed). Plus `BreadcrumbList`
|
||||
(Home → category → app).
|
||||
- Site-wide: one `WebSite` node on `/`. No `SearchAction` in v1 (search
|
||||
is client-side; a `?q=` deep-link is a cheap post-v1 addition — docs/15
|
||||
§2).
|
||||
(Home → Apps → app).
|
||||
- Site-wide: one `WebSite` node on `/` and `/vi` (`inLanguage` per
|
||||
locale). No `SearchAction` yet — but since v1.1 `/apps?q=<terms>` **is**
|
||||
a working deep link (`src/lib/urlstate.ts`, docs/05 §A3), so the node is
|
||||
now possible; it is a backlog item (docs/15 §2), not a blocker.
|
||||
- JSON-LD `<script type="application/ld+json">` blocks are data blocks,
|
||||
not executable scripts, so the strict CSP (docs/09 §4) does not need
|
||||
hashes for them — verify once in the S1 spike build and note it there.
|
||||
hashes for them (confirmed in the S1 build; `check:csp` skips them
|
||||
explicitly). `<` is escaped as `<`, so a `</script>` inside a name
|
||||
or summary cannot end the block early.
|
||||
- **OG/meta:** `og:site_name`, `og:title`, `og:description` (locale
|
||||
summary), `og:url` (canonical), `og:locale` + `og:locale:alternate`,
|
||||
`twitter:card=summary`. Per-app OG images stay post-v1 (docs/15 §2).
|
||||
@@ -186,10 +235,11 @@ the same PR — the current policy would junk such mail by design.
|
||||
and the legal pages all fell through to `site.tagline` — 47 pages sharing
|
||||
one string, which Google treats as a quality signal and usually rewrites.
|
||||
They now build from `meta.apps`, `meta.categories`, `meta.category` and
|
||||
`meta.legal`, so 694 of 699 pages are unique; the remainder are the home
|
||||
page (where the tagline *is* the description) and the noindex error pages.
|
||||
Legal pages also carry the `— SoftHarbor` title suffix now: an unbranded
|
||||
`<title>` in a SERP reads as somebody else's document.
|
||||
`meta.legal` — and since v1.1 `meta.contact` — so 694 of 699 pages were
|
||||
unique when measured (2026-07-30; 701 pages at v1.1); the remainder are
|
||||
the home page (where the tagline *is* the description) and the noindex
|
||||
error pages. Legal pages also carry the `— SoftHarbor` title suffix: an
|
||||
unbranded `<title>` in a SERP reads as somebody else's document.
|
||||
|
||||
## 8. Search-engine plumbing
|
||||
|
||||
@@ -198,7 +248,9 @@ schemes):
|
||||
|
||||
1. GSC → Add property → **Domain** → `softharbor.net`.
|
||||
2. Copy the `google-site-verification=…` TXT → Cloudflare DNS (name `@`)
|
||||
→ Verify (propagation is usually minutes).
|
||||
→ Verify (propagation is usually minutes). *The TXT record is published
|
||||
(observed 2026-10-21); whether the property, the sitemap submission,
|
||||
the Bing import and Crawler Hints are done: ⚠ verify (docs/15 §5).*
|
||||
3. Post-launch: submit `https://softharbor.net/sitemap-index.xml`; URL
|
||||
Inspection on `/` and one app page; confirm hreflang pairs report clean
|
||||
after the first crawl.
|
||||
@@ -219,13 +271,23 @@ hreflang errors) — added to docs/13 §6.
|
||||
|
||||
| Feature | Status & reason | Recipe if ever needed |
|
||||
|---|---|---|
|
||||
| **Rate limiting** | OFF. Static assets are unbilled and edge-served — there is nothing costly to protect; and on the Free zone the Block action serves **Cloudflare's default 429 page** (custom responses are Business+), undermining our error-page polish. | Free zone includes **1 rule**: Security → WAF → Rate limiting rules → e.g. `(http.host eq "softharbor.net")`, 100 req / 10 s per IP, Block 1 min. Accept the default 429 page, or upgrade zone for custom response. |
|
||||
| **Bot Fight Mode** | OFF. It challenges automated clients — which would break exactly what we publish for automation: `/api/apps.json` consumers and the `notify.py` RSS cron. | Only with a scoped WAF exception for `/api/*` and `/rss.xml` — and only in response to actual abuse. |
|
||||
| **Rate limiting** (zone) | OFF. Static assets are unbilled and edge-served — there is nothing costly to protect; and on the Free zone the Block action serves **Cloudflare's default 429 page** (custom responses are Business+), undermining our error-page polish. *Not to be confused with the Worker's own Workers Rate Limiting binding, which guards only `/api/verify` (20/60 s per IP or /64, docs/08 Part E).* | Free zone includes **1 rule**: Security → WAF → Rate limiting rules → e.g. `(http.host eq "softharbor.net")`, 100 req / 10 s per IP, Block 1 min. Accept the default 429 page, or upgrade zone for custom response. |
|
||||
| **Bot Fight Mode** | OFF. It challenges automated clients — which would break exactly what we publish for automation: `/api/apps.json` consumers and the `notify.py` RSS cron. The legal gate's Turnstile check (D25) is no substitute and no conflict: it runs in visitors' browsers, after consent, and fails open. | Only with a scoped WAF exception for `/api/*` and `/rss.xml` — and only in response to actual abuse. |
|
||||
| **Speed Brain** (speculative prefetch) | **Should be OFF.** Cloudflare refuses speculative requests on Worker requests — a `Sec-Purpose: prefetch` GET gets a bare **503** with `Cf-Speculation-Refused: prefetch refused: disabled for worker requests` — which is why `astro.config.ts` sets `prefetch: false` (docs/02 §4). **Observed 2026-10-21: production still sends `Speculation-Rules: "/cdn-cgi/speculation"`**, i.e. the zone feature appears to be on (H12, ⚠ verify and turn off). | Turn the zone's Speed Brain toggle off (Speed settings in the dashboard). Revisit only if Cloudflare ever allows speculation on Worker routes. |
|
||||
| **Cloudflare Custom Errors** | Unavailable on Free zone (paid-plans feature; also never applies to 500/501/503/505). `/errors/{403,429,500}` templates stay **dormant** as designed. | Upgrade zone to Pro → Rules → Custom Error Rules → point 403/429 at the templates. Decision logged if taken. |
|
||||
| **Cache tuning / Page Rules / Snippets** | Defaults. Workers Static Assets already serves from the edge; `_headers` (docs/09 §4) owns per-path `Cache-Control`. | — |
|
||||
| **Cache tuning / Page Rules / Snippets** | Defaults. Workers Static Assets already serves from the edge; `_headers` (docs/09 §4) owns per-path `Cache-Control` — `/*` sets none and each specific rule detaches with `! Cache-Control`, because Cloudflare comma-joins a header set by several matching rules. | — |
|
||||
|
||||
## 10. Rollout sequence & verification
|
||||
|
||||
> **Status 2026-10-21.** The rollout below is complete and historical: www
|
||||
> redirects (R1), HSTS is at P3, DMARC is `p=quarantine`, the noindex header
|
||||
> is long gone and the GSC verification record is published (§2.2, §5, §6).
|
||||
> What recurs is the **verification after every merge** — and before it,
|
||||
> waiting for the merge commit's "Workers Builds" check to go green: builds
|
||||
> are serialized and a `main` merge can sit in the queue ~20 minutes, so an
|
||||
> unchanged site right after a merge usually means "not deployed yet", not
|
||||
> "broken" (docs/13 §3). The edge-propagation note below applies on top.
|
||||
>
|
||||
> **Status 2026-07-27 — apex is LIVE.** `wrangler deploy` created the apex DNS
|
||||
> record and provisioned the certificate; `https://softharbor.net` serves the
|
||||
> M1 skeleton. Verified: http → https 301, apex 200, `/nope` → branded 404,
|
||||
@@ -259,9 +321,10 @@ Order (fits between M5 and M6 of docs/15 — roughly one focused day):
|
||||
|
||||
1. Zone added → NS live (external registrar) → DNSSEC on.
|
||||
2. Email Routing + DMARC → `contact@softharbor.net` receiving → update
|
||||
docs/14 + `security.txt` (H5 ✅).
|
||||
docs/14 + `security.txt` (H5 ✅ at the time; superseded 2026-10-21 by
|
||||
D27 — §6).
|
||||
3. `wrangler.jsonc` routes/workers_dev/preview_urls change → deploy →
|
||||
apex live.
|
||||
apex live. (The routes later moved to dashboard custom domains — §3.)
|
||||
4. `www` placeholder record + Redirect Rule R1 → Always Use HTTPS on.
|
||||
5. HSTS phase P1 on.
|
||||
6. `site` config + robots.txt + JSON-LD + noindex metas land in the repo.
|
||||
@@ -286,11 +349,22 @@ dig TXT _dmarc.softharbor.net +short # DMARC policy present
|
||||
curl -sI https://softharbor.net/apps/7-zip
|
||||
curl -sI https://softharbor.net/apps/7-zip/
|
||||
|
||||
# CSP must show script-src 'self' with NO sha256- token (docs/09 §4, D18).
|
||||
# Header CSP is ONLY frame-ancestors (D20, docs/09 §4) — script-src/style-src
|
||||
# live in the per-page meta tag, which must list the two Cloudflare origins.
|
||||
curl -sI https://softharbor.net/ | grep -i content-security-policy
|
||||
curl -s https://softharbor.net/ | grep -o '<meta http-equiv="content-security-policy"[^>]*>'
|
||||
|
||||
# Hashed assets must win the immutable cache rule over the /* default.
|
||||
# Hashed assets: exactly ONE Cache-Control, the immutable one — never a
|
||||
# comma-joined "max-age=0 …, max-age=31536000" (docs/09 §4).
|
||||
curl -sI https://softharbor.net/_astro/<any-hashed-file> | grep -i cache-control
|
||||
|
||||
# The Worker answers /api/verify (D25): a junk token → 403 {"error":"rejected"};
|
||||
# 503 "not_configured" = runtime secret missing; a bare 405 = Worker not live.
|
||||
curl -s -X POST -H 'Origin: https://softharbor.net' -H 'Content-Type: application/json' \
|
||||
-d '{"token":"x"}' https://softharbor.net/api/verify
|
||||
|
||||
# Speed Brain off: no Speculation-Rules header (§9).
|
||||
curl -sI https://softharbor.net/ | grep -i speculation-rules
|
||||
```
|
||||
|
||||
Plus: hstspreload.org checker (informational until P3), a DMARC report
|
||||
|
||||
+10
-8
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "softharbor",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Bilingual (EN/VI) directory of free and buy-once desktop software",
|
||||
@@ -8,13 +8,13 @@
|
||||
"author": "poli0981 / SkullMute",
|
||||
"packageManager": "pnpm@11.15.1",
|
||||
"engines": {
|
||||
"node": ">=24 <25"
|
||||
"node": ">=26 <27"
|
||||
},
|
||||
"//": "Dependency build-script policy lives in pnpm-workspace.yaml (allowBuilds) — pnpm 11 ignores a \"pnpm\" field here.",
|
||||
"scripts": {
|
||||
"build": "pnpm run validate:data && pnpm run i18n:check && astro build && pnpm run postbuild:html && pnpm run check:csp && pnpm run check:assets && pnpm run check:sw && pnpm run check:feed",
|
||||
"build:site": "astro build",
|
||||
"check": "astro check",
|
||||
"check": "astro check && tsc --noEmit",
|
||||
"check:assets": "node scripts/check-assets.mjs",
|
||||
"check:csp": "node scripts/check-csp.mjs",
|
||||
"check:feed": "node scripts/check-feed.mjs",
|
||||
@@ -33,7 +33,8 @@
|
||||
"quarantine": "node scripts/quarantine.mjs",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"validate:data": "node scripts/validate-data.mjs"
|
||||
"validate:data": "node scripts/validate-data.mjs",
|
||||
"vt:recheck": "node scripts/vt-recheck.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
@@ -42,7 +43,7 @@
|
||||
"@fontsource-variable/bricolage-grotesque": "^5.3.0",
|
||||
"@fontsource/be-vietnam-pro": "^5.3.0",
|
||||
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||
"@iconify-json/lucide": "^1.2.146",
|
||||
"@iconify-json/lucide": "^1.2.147",
|
||||
"@iconify-json/simple-icons": "^1.2.100",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"@vite-pwa/astro": "^1.2.0",
|
||||
@@ -58,13 +59,14 @@
|
||||
"@axe-core/playwright": "^4.14.0",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@playwright/test": "^1.64.1",
|
||||
"@types/node": "^24.19.2",
|
||||
"@types/node": "^26.6.5",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"@vitest/coverage-v8": "5.0.5",
|
||||
"eslint": "^10.13.0",
|
||||
"eslint-plugin-astro": "^3.2.1",
|
||||
"eslint-plugin-svelte": "^3.23.1",
|
||||
"globals": "^17.13.0",
|
||||
"happy-dom": "^21.0.3",
|
||||
"happy-dom": "^21.0.4",
|
||||
"knip": "^6.42.1",
|
||||
"lefthook": "^2.2.2",
|
||||
"prettier": "^3.9.10",
|
||||
@@ -73,7 +75,7 @@
|
||||
"prettier-plugin-tailwindcss": "^0.8.1",
|
||||
"sharp": "^0.35.5",
|
||||
"svelte-eslint-parser": "^1.9.0",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
||||
"typescript-eslint": "^8.72.0",
|
||||
"vitest": "^5.0.5",
|
||||
"wrangler": "^4.151.3"
|
||||
|
||||
Generated
+350
-119
@@ -20,7 +20,7 @@ importers:
|
||||
version: 3.7.4
|
||||
'@astrojs/svelte':
|
||||
specifier: ^9.1.0
|
||||
version: 9.1.0(@types/node@24.19.2)(astro@7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(terser@5.49.0)(typescript@6.0.3)(yaml@2.9.1)
|
||||
version: 9.1.0(@types/node@26.6.5)(@typescript/typescript6@6.0.2)(astro@7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(terser@5.49.0)(yaml@2.9.1)
|
||||
'@fontsource-variable/bricolage-grotesque':
|
||||
specifier: ^5.3.0
|
||||
version: 5.3.0
|
||||
@@ -31,20 +31,20 @@ importers:
|
||||
specifier: ^5.3.0
|
||||
version: 5.3.0
|
||||
'@iconify-json/lucide':
|
||||
specifier: ^1.2.146
|
||||
version: 1.2.146
|
||||
specifier: ^1.2.147
|
||||
version: 1.2.147
|
||||
'@iconify-json/simple-icons':
|
||||
specifier: ^1.2.100
|
||||
version: 1.2.100
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.3.3
|
||||
version: 4.3.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
version: 4.3.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
'@vite-pwa/astro':
|
||||
specifier: ^1.2.0
|
||||
version: 1.2.0(astro@7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1))
|
||||
version: 1.2.0(astro@7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1))
|
||||
astro:
|
||||
specifier: ^7.4.1
|
||||
version: 7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
version: 7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
minisearch:
|
||||
specifier: ^7.2.0
|
||||
version: 7.2.0
|
||||
@@ -59,11 +59,11 @@ importers:
|
||||
version: 4.3.3
|
||||
unplugin-icons:
|
||||
specifier: ^24.0.0
|
||||
version: 24.0.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
version: 24.0.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
devDependencies:
|
||||
'@astrojs/check':
|
||||
specifier: ^0.9.11
|
||||
version: 0.9.11(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)
|
||||
version: 0.9.11(@emnapi/runtime@1.11.3)(@typescript/typescript6@6.0.2)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)
|
||||
'@axe-core/playwright':
|
||||
specifier: ^4.14.0
|
||||
version: 4.14.0(playwright-core@1.64.1)
|
||||
@@ -74,8 +74,11 @@ importers:
|
||||
specifier: ^1.64.1
|
||||
version: 1.64.1
|
||||
'@types/node':
|
||||
specifier: ^24.19.2
|
||||
version: 24.19.2
|
||||
specifier: ^26.6.5
|
||||
version: 26.6.5
|
||||
'@typescript/native':
|
||||
specifier: npm:typescript@^7.0.2
|
||||
version: typescript@7.0.2
|
||||
'@vitest/coverage-v8':
|
||||
specifier: 5.0.5
|
||||
version: 5.0.5(vitest@5.0.5)
|
||||
@@ -84,7 +87,7 @@ importers:
|
||||
version: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
eslint-plugin-astro:
|
||||
specifier: ^3.2.1
|
||||
version: 3.2.1(@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))
|
||||
version: 3.2.1(@typescript-eslint/parser@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))
|
||||
eslint-plugin-svelte:
|
||||
specifier: ^3.23.1
|
||||
version: 3.23.1(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(svelte@5.57.2(@typescript-eslint/types@8.72.0))
|
||||
@@ -92,8 +95,8 @@ importers:
|
||||
specifier: ^17.13.0
|
||||
version: 17.13.0
|
||||
happy-dom:
|
||||
specifier: ^21.0.3
|
||||
version: 21.0.3
|
||||
specifier: ^21.0.4
|
||||
version: 21.0.4
|
||||
knip:
|
||||
specifier: ^6.42.1
|
||||
version: 6.42.1
|
||||
@@ -114,22 +117,22 @@ importers:
|
||||
version: 0.8.1(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier-plugin-svelte@4.1.1(prettier@3.9.10)(svelte@5.57.2(@typescript-eslint/types@8.72.0)))(prettier@3.9.10)
|
||||
sharp:
|
||||
specifier: ^0.35.5
|
||||
version: 0.35.5(@types/node@24.19.2)
|
||||
version: 0.35.5(@types/node@26.6.5)
|
||||
svelte-eslint-parser:
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(svelte@5.57.2(@typescript-eslint/types@8.72.0))
|
||||
typescript:
|
||||
specifier: ^6.0.3
|
||||
version: 6.0.3
|
||||
specifier: npm:@typescript/typescript6@^6.0.2
|
||||
version: '@typescript/typescript6@6.0.2'
|
||||
typescript-eslint:
|
||||
specifier: ^8.72.0
|
||||
version: 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
version: 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
vitest:
|
||||
specifier: ^5.0.5
|
||||
version: 5.0.5(@types/node@24.19.2)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.3)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
version: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.4)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
wrangler:
|
||||
specifier: ^4.151.3
|
||||
version: 4.151.3(@types/node@24.19.2)
|
||||
version: 4.151.3(@types/node@26.6.5)
|
||||
|
||||
packages:
|
||||
|
||||
@@ -1234,8 +1237,8 @@ packages:
|
||||
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
|
||||
engines: {node: '>=18.18'}
|
||||
|
||||
'@iconify-json/lucide@1.2.146':
|
||||
resolution: {integrity: sha512-T7qetsZJ682CCVT2X8C5uYEF6G/mtSoPl8F87wvu1LbfeVt4RxdP03NtaAs4RrrAXbWHBLjKrb8cmMtDucoI5g==}
|
||||
'@iconify-json/lucide@1.2.147':
|
||||
resolution: {integrity: sha512-7Qqa/joSBeUxihWsQJx5nKcqMWtV3YrH90Jldxcx4J9ciTLavRUlpexQwRTcx9dcb7CJpISfjZTj42zD/30sqA==}
|
||||
|
||||
'@iconify-json/simple-icons@1.2.100':
|
||||
resolution: {integrity: sha512-536pN2RCEQyy5bYwzayrs4e9egr8cmtVcbdSHLaQl/ULUsihzn1eZ0+Hhn50zgz9cbEotiynKsKQSEjFJ7qKmw==}
|
||||
@@ -2179,6 +2182,9 @@ packages:
|
||||
'@types/node@24.19.2':
|
||||
resolution: {integrity: sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==}
|
||||
|
||||
'@types/node@26.6.5':
|
||||
resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}
|
||||
|
||||
'@types/resolve@1.20.2':
|
||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
||||
|
||||
@@ -2256,6 +2262,130 @@ packages:
|
||||
resolution: {integrity: sha512-E2mroviasaWecDzTGiGMtuEguuLVOeRggnrIn93CJuxYJzQBHbyymlT08aVQydbBal5538o+JkBKXh2sRuCyIA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
||||
resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
|
||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@typescript/typescript-darwin-x64@7.0.2':
|
||||
resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@typescript/typescript-linux-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-arm@7.0.2':
|
||||
resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-loong64@7.0.2':
|
||||
resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
||||
resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
||||
resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
||||
resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-s390x@7.0.2':
|
||||
resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-x64@7.0.2':
|
||||
resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [netbsd]
|
||||
|
||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
|
||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
'@typescript/typescript-sunos-x64@7.0.2':
|
||||
resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
'@typescript/typescript-win32-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@typescript/typescript-win32-x64@7.0.2':
|
||||
resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@typescript/typescript6@6.0.2':
|
||||
resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==}
|
||||
hasBin: true
|
||||
|
||||
'@ungap/structured-clone@1.4.0':
|
||||
resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==}
|
||||
|
||||
@@ -3065,8 +3195,8 @@ packages:
|
||||
h3@1.15.11:
|
||||
resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==}
|
||||
|
||||
happy-dom@21.0.3:
|
||||
resolution: {integrity: sha512-PesNgu5BnIEmAwzKGewB3K1ORFeznFZJ4JrRz89ea1wkHnxskdpzX9sN/+zb4KO6k8oSMhyJSj/cwXAFrYBBNA==}
|
||||
happy-dom@21.0.4:
|
||||
resolution: {integrity: sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
|
||||
has-bigints@1.1.0:
|
||||
@@ -4357,6 +4487,11 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
typescript@7.0.2:
|
||||
resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
hasBin: true
|
||||
|
||||
ufo@1.6.4:
|
||||
resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==}
|
||||
|
||||
@@ -4377,6 +4512,9 @@ packages:
|
||||
undici-types@7.24.6:
|
||||
resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==}
|
||||
|
||||
undici-types@8.9.0:
|
||||
resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
|
||||
|
||||
undici@7.29.1:
|
||||
resolution: {integrity: sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q==}
|
||||
engines: {node: '>=20.18.1'}
|
||||
@@ -5004,12 +5142,12 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- '@emnapi/runtime'
|
||||
|
||||
'@astrojs/check@0.9.11(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)':
|
||||
'@astrojs/check@0.9.11(@emnapi/runtime@1.11.3)(@typescript/typescript6@6.0.2)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)':
|
||||
dependencies:
|
||||
'@astrojs/language-server': 2.17.2(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)
|
||||
'@astrojs/language-server': 2.17.2(@emnapi/runtime@1.11.3)(@typescript/typescript6@6.0.2)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)
|
||||
chokidar: 5.0.0
|
||||
kleur: 4.1.5
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
yargs: 18.2.0
|
||||
transitivePeerDependencies:
|
||||
- '@emnapi/runtime'
|
||||
@@ -5136,11 +5274,11 @@ snapshots:
|
||||
unified: 11.0.5
|
||||
yaml: 2.9.1
|
||||
|
||||
'@astrojs/language-server@2.17.2(@emnapi/runtime@1.11.3)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)(typescript@6.0.3)':
|
||||
'@astrojs/language-server@2.17.2(@emnapi/runtime@1.11.3)(@typescript/typescript6@6.0.2)(prettier-plugin-astro@1.1.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(prettier@3.9.10))(prettier@3.9.10)':
|
||||
dependencies:
|
||||
'@astrojs/astro2tsx': 0.1.3(@emnapi/runtime@1.11.3)
|
||||
'@astrojs/yaml2ts': 0.2.4
|
||||
'@volar/kit': 2.4.28(typescript@6.0.3)
|
||||
'@volar/kit': 2.4.28(@typescript/typescript6@6.0.2)
|
||||
'@volar/language-core': 2.4.28
|
||||
'@volar/language-server': 2.4.28
|
||||
'@volar/language-service': 2.4.28
|
||||
@@ -5184,15 +5322,15 @@ snapshots:
|
||||
sitemap: 9.0.1
|
||||
zod: 4.6.7
|
||||
|
||||
'@astrojs/svelte@9.1.0(@types/node@24.19.2)(astro@7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(terser@5.49.0)(typescript@6.0.3)(yaml@2.9.1)':
|
||||
'@astrojs/svelte@9.1.0(@types/node@26.6.5)(@typescript/typescript6@6.0.2)(astro@7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(esbuild@0.28.2)(jiti@2.7.0)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(terser@5.49.0)(yaml@2.9.1)':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 7.3.1(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
astro: 7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
'@sveltejs/vite-plugin-svelte': 7.3.1(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
astro: 7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
svelte: 5.57.2(@typescript-eslint/types@8.72.0)
|
||||
svelte2tsx: 0.7.62(svelte@5.57.2(@typescript-eslint/types@8.72.0))(typescript@6.0.3)
|
||||
typescript: 6.0.3
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
svelte2tsx: 0.7.62(@typescript/typescript6@6.0.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0))
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- '@vitejs/devtools'
|
||||
@@ -6171,7 +6309,7 @@ snapshots:
|
||||
|
||||
'@humanwhocodes/retry@0.4.3': {}
|
||||
|
||||
'@iconify-json/lucide@1.2.146':
|
||||
'@iconify-json/lucide@1.2.147':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
|
||||
@@ -6716,14 +6854,14 @@ snapshots:
|
||||
dependencies:
|
||||
acorn: 8.19.0
|
||||
|
||||
'@sveltejs/vite-plugin-svelte@7.3.1(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
'@sveltejs/vite-plugin-svelte@7.3.1(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
dependencies:
|
||||
deepmerge: 4.3.1
|
||||
magic-string: 1.4.3
|
||||
obug: 2.2.1
|
||||
svelte: 5.57.2(@typescript-eslint/types@8.72.0)
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
|
||||
'@tailwindcss/node@4.3.3':
|
||||
dependencies:
|
||||
@@ -6786,12 +6924,12 @@ snapshots:
|
||||
'@tailwindcss/oxide-win32-arm64-msvc': 4.3.3
|
||||
'@tailwindcss/oxide-win32-x64-msvc': 4.3.3
|
||||
|
||||
'@tailwindcss/vite@4.3.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
'@tailwindcss/vite@4.3.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
dependencies:
|
||||
'@tailwindcss/node': 4.3.3
|
||||
'@tailwindcss/oxide': 4.3.3
|
||||
tailwindcss: 4.3.3
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
|
||||
'@trickfilm400/rollup-plugin-off-main-thread@3.0.0-pre1':
|
||||
dependencies:
|
||||
@@ -6837,11 +6975,15 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 7.24.6
|
||||
|
||||
'@types/node@26.6.5':
|
||||
dependencies:
|
||||
undici-types: 8.9.0
|
||||
|
||||
'@types/resolve@1.20.2': {}
|
||||
|
||||
'@types/sax@1.2.7':
|
||||
dependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
|
||||
'@types/trusted-types@2.0.7': {}
|
||||
|
||||
@@ -6851,42 +6993,42 @@ snapshots:
|
||||
|
||||
'@types/ws@8.18.2':
|
||||
dependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.72.0(@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/eslint-plugin@8.72.0(@typescript-eslint/parser@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@typescript-eslint/parser': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/parser': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
'@typescript-eslint/scope-manager': 8.72.0
|
||||
'@typescript-eslint/type-utils': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/type-utils': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
'@typescript-eslint/utils': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
'@typescript-eslint/visitor-keys': 8.72.0
|
||||
eslint: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
ignore: 7.0.13
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||
typescript: 6.0.3
|
||||
ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2)
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/parser@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.72.0
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)
|
||||
'@typescript-eslint/visitor-keys': 8.72.0
|
||||
debug: 4.4.3(supports-color@10.2.2)
|
||||
eslint: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.72.0(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/project-service@8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.72.0(typescript@6.0.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.72.0(@typescript/typescript6@6.0.2)
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
debug: 4.4.3(supports-color@10.2.2)
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -6895,47 +7037,47 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
'@typescript-eslint/visitor-keys': 8.72.0
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.72.0(typescript@6.0.3)':
|
||||
'@typescript-eslint/tsconfig-utils@8.72.0(@typescript/typescript6@6.0.2)':
|
||||
dependencies:
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
|
||||
'@typescript-eslint/type-utils@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/type-utils@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)
|
||||
'@typescript-eslint/utils': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
debug: 4.4.3(supports-color@10.2.2)
|
||||
eslint: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||
typescript: 6.0.3
|
||||
ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2)
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.72.0': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.72.0(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/typescript-estree@8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.72.0(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.72.0(typescript@6.0.3)
|
||||
'@typescript-eslint/project-service': 8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)
|
||||
'@typescript-eslint/tsconfig-utils': 8.72.0(@typescript/typescript6@6.0.2)
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
'@typescript-eslint/visitor-keys': 8.72.0
|
||||
debug: 4.4.3(supports-color@10.2.2)
|
||||
minimatch: 10.2.6
|
||||
semver: 7.8.5
|
||||
tinyglobby: 0.2.17
|
||||
ts-api-utils: 2.5.0(typescript@6.0.3)
|
||||
typescript: 6.0.3
|
||||
ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2)
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
|
||||
'@typescript-eslint/utils@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))
|
||||
'@typescript-eslint/scope-manager': 8.72.0
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)
|
||||
eslint: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -6944,12 +7086,76 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.72.0
|
||||
eslint-visitor-keys: 5.0.1
|
||||
|
||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-darwin-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-arm@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-loong64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-s390x@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-sunos-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-win32-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-win32-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript6@6.0.2':
|
||||
dependencies:
|
||||
'@typescript/old': typescript@6.0.3
|
||||
|
||||
'@ungap/structured-clone@1.4.0': {}
|
||||
|
||||
'@vite-pwa/astro@1.2.0(astro@7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1))':
|
||||
'@vite-pwa/astro@1.2.0(astro@7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1))':
|
||||
dependencies:
|
||||
astro: 7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite-plugin-pwa: 1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1)
|
||||
astro: 7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite-plugin-pwa: 1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1)
|
||||
|
||||
'@vitest/coverage-v8@5.0.5(vitest@5.0.5)':
|
||||
dependencies:
|
||||
@@ -6961,7 +7167,7 @@ snapshots:
|
||||
obug: 3.0.0
|
||||
std-env: 4.3.0
|
||||
tinyrainbow: 3.2.0
|
||||
vitest: 5.0.5(@types/node@24.19.2)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.3)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.4)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
|
||||
'@vitest/istanbul-lib-coverage@1.0.2': {}
|
||||
|
||||
@@ -6969,23 +7175,23 @@ snapshots:
|
||||
dependencies:
|
||||
'@vitest/istanbul-lib-coverage': 1.0.2
|
||||
|
||||
'@vitest/mocker@5.0.5(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
'@vitest/mocker@5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))':
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.31
|
||||
'@vitest/spy': 5.0.5
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 1.4.3
|
||||
optionalDependencies:
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
|
||||
'@vitest/spy@5.0.5': {}
|
||||
|
||||
'@volar/kit@2.4.28(typescript@6.0.3)':
|
||||
'@volar/kit@2.4.28(@typescript/typescript6@6.0.2)':
|
||||
dependencies:
|
||||
'@volar/language-service': 2.4.28
|
||||
'@volar/typescript': 2.4.28
|
||||
typesafe-path: 0.2.2
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
vscode-languageserver-textdocument: 1.0.15
|
||||
vscode-uri: 3.2.0
|
||||
|
||||
@@ -7116,7 +7322,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
astro@7.4.1(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1):
|
||||
astro@7.4.1(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1):
|
||||
dependencies:
|
||||
'@astrojs/compiler-rs': 0.5.2
|
||||
'@astrojs/internal-helpers': 0.13.0
|
||||
@@ -7165,13 +7371,13 @@ snapshots:
|
||||
unifont: 1.0.3
|
||||
unstorage: 1.17.6
|
||||
verkit: 0.5.0
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vitefu: 1.1.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
xxhash-wasm: 1.1.0
|
||||
yargs-parser: 22.0.0
|
||||
zod: 4.6.7
|
||||
optionalDependencies:
|
||||
sharp: 0.35.5(@types/node@24.19.2)
|
||||
sharp: 0.35.5(@types/node@26.6.5)
|
||||
transitivePeerDependencies:
|
||||
- '@azure/app-configuration'
|
||||
- '@azure/cosmos'
|
||||
@@ -7269,7 +7475,7 @@ snapshots:
|
||||
|
||||
buffer-image-size@0.6.4:
|
||||
dependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
|
||||
cacheable@2.5.0:
|
||||
dependencies:
|
||||
@@ -7619,7 +7825,7 @@ snapshots:
|
||||
|
||||
escape-string-regexp@4.0.0: {}
|
||||
|
||||
eslint-plugin-astro@3.2.1(@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)):
|
||||
eslint-plugin-astro@3.2.1(@typescript-eslint/parser@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript-eslint@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))
|
||||
'@jridgewell/sourcemap-codec': 1.6.0
|
||||
@@ -7632,8 +7838,8 @@ snapshots:
|
||||
postcss-selector-parser: 7.1.7
|
||||
synckit: 0.11.13
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
typescript-eslint: 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/parser': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
typescript-eslint: 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -7953,9 +8159,9 @@ snapshots:
|
||||
ufo: 1.6.4
|
||||
uncrypto: 0.1.3
|
||||
|
||||
happy-dom@21.0.3:
|
||||
happy-dom@21.0.4:
|
||||
dependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
'@types/whatwg-mimetype': 3.0.2
|
||||
'@types/ws': 8.18.2
|
||||
buffer-image-size: 0.6.4
|
||||
@@ -8452,10 +8658,10 @@ snapshots:
|
||||
|
||||
micromark-util-types@2.0.3: {}
|
||||
|
||||
miniflare@5.20261019.1-beta(@types/node@24.19.2):
|
||||
miniflare@5.20261019.1-beta(@types/node@26.6.5):
|
||||
dependencies:
|
||||
'@cspotcode/source-map-support': 0.8.1
|
||||
sharp: 0.35.5(@types/node@24.19.2)
|
||||
sharp: 0.35.5(@types/node@26.6.5)
|
||||
undici: 7.29.1
|
||||
workerd: 1.20261019.1
|
||||
ws: 8.21.0
|
||||
@@ -8949,7 +9155,7 @@ snapshots:
|
||||
es-errors: 1.3.0
|
||||
es-object-atoms: 1.1.2
|
||||
|
||||
sharp@0.35.5(@types/node@24.19.2):
|
||||
sharp@0.35.5(@types/node@26.6.5):
|
||||
dependencies:
|
||||
'@img/colour': 1.1.0
|
||||
detect-libc: 2.1.2
|
||||
@@ -8980,7 +9186,7 @@ snapshots:
|
||||
'@img/sharp-win32-arm64': 0.35.5
|
||||
'@img/sharp-win32-ia32': 0.35.5
|
||||
'@img/sharp-win32-x64': 0.35.5
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
|
||||
shebang-command@2.0.0:
|
||||
dependencies:
|
||||
@@ -9156,12 +9362,12 @@ snapshots:
|
||||
optionalDependencies:
|
||||
svelte: 5.57.2(@typescript-eslint/types@8.72.0)
|
||||
|
||||
svelte2tsx@0.7.62(svelte@5.57.2(@typescript-eslint/types@8.72.0))(typescript@6.0.3):
|
||||
svelte2tsx@0.7.62(@typescript/typescript6@6.0.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0)):
|
||||
dependencies:
|
||||
dedent-js: 1.0.1
|
||||
scule: 1.3.0
|
||||
svelte: 5.57.2(@typescript-eslint/types@8.72.0)
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
|
||||
svelte@5.57.2(@typescript-eslint/types@8.72.0):
|
||||
dependencies:
|
||||
@@ -9238,9 +9444,9 @@ snapshots:
|
||||
|
||||
trough@2.2.0: {}
|
||||
|
||||
ts-api-utils@2.5.0(typescript@6.0.3):
|
||||
ts-api-utils@2.5.0(@typescript/typescript6@6.0.2):
|
||||
dependencies:
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
|
||||
tslib@2.8.1: {}
|
||||
|
||||
@@ -9289,19 +9495,42 @@ snapshots:
|
||||
dependencies:
|
||||
semver: 7.8.5
|
||||
|
||||
typescript-eslint@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3):
|
||||
typescript-eslint@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2):
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 8.72.0(@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/parser': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.72.0(@typescript-eslint/parser@8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
'@typescript-eslint/parser': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
'@typescript-eslint/typescript-estree': 8.72.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)
|
||||
'@typescript-eslint/utils': 8.72.0(@typescript/typescript6@6.0.2)(eslint@10.13.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)
|
||||
eslint: 10.13.0(jiti@2.7.0)(supports-color@10.2.2)
|
||||
typescript: 6.0.3
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
typescript@6.0.3: {}
|
||||
|
||||
typescript@7.0.2:
|
||||
optionalDependencies:
|
||||
'@typescript/typescript-aix-ppc64': 7.0.2
|
||||
'@typescript/typescript-darwin-arm64': 7.0.2
|
||||
'@typescript/typescript-darwin-x64': 7.0.2
|
||||
'@typescript/typescript-freebsd-arm64': 7.0.2
|
||||
'@typescript/typescript-freebsd-x64': 7.0.2
|
||||
'@typescript/typescript-linux-arm': 7.0.2
|
||||
'@typescript/typescript-linux-arm64': 7.0.2
|
||||
'@typescript/typescript-linux-loong64': 7.0.2
|
||||
'@typescript/typescript-linux-mips64el': 7.0.2
|
||||
'@typescript/typescript-linux-ppc64': 7.0.2
|
||||
'@typescript/typescript-linux-riscv64': 7.0.2
|
||||
'@typescript/typescript-linux-s390x': 7.0.2
|
||||
'@typescript/typescript-linux-x64': 7.0.2
|
||||
'@typescript/typescript-netbsd-arm64': 7.0.2
|
||||
'@typescript/typescript-netbsd-x64': 7.0.2
|
||||
'@typescript/typescript-openbsd-arm64': 7.0.2
|
||||
'@typescript/typescript-openbsd-x64': 7.0.2
|
||||
'@typescript/typescript-sunos-x64': 7.0.2
|
||||
'@typescript/typescript-win32-arm64': 7.0.2
|
||||
'@typescript/typescript-win32-x64': 7.0.2
|
||||
|
||||
ufo@1.6.4: {}
|
||||
|
||||
ultrahtml@1.7.0: {}
|
||||
@@ -9319,6 +9548,8 @@ snapshots:
|
||||
|
||||
undici-types@7.24.6: {}
|
||||
|
||||
undici-types@8.9.0: {}
|
||||
|
||||
undici@7.29.1: {}
|
||||
|
||||
undici@8.12.3: {}
|
||||
@@ -9384,13 +9615,13 @@ snapshots:
|
||||
|
||||
universalify@2.0.1: {}
|
||||
|
||||
unplugin-icons@24.0.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
unplugin-icons@24.0.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(svelte@5.57.2(@typescript-eslint/types@8.72.0))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
dependencies:
|
||||
'@antfu/install-pkg': 1.1.0
|
||||
'@iconify/utils': 3.1.7
|
||||
local-pkg: 1.2.1
|
||||
obug: 2.2.1
|
||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
optionalDependencies:
|
||||
svelte: 5.57.2(@typescript-eslint/types@8.72.0)
|
||||
transitivePeerDependencies:
|
||||
@@ -9405,7 +9636,7 @@ snapshots:
|
||||
- vite
|
||||
- webpack
|
||||
|
||||
unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.62.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
dependencies:
|
||||
'@jridgewell/remapping': 2.3.5
|
||||
picomatch: 4.0.7
|
||||
@@ -9414,7 +9645,7 @@ snapshots:
|
||||
esbuild: 0.28.2
|
||||
rolldown: 1.2.14
|
||||
rollup: 4.62.2
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
|
||||
unstorage@1.17.6:
|
||||
dependencies:
|
||||
@@ -9453,18 +9684,18 @@ snapshots:
|
||||
'@types/unist': 3.0.3
|
||||
vfile-message: 4.0.3
|
||||
|
||||
vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1):
|
||||
vite-plugin-pwa@1.3.0(supports-color@10.2.2)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))(workbox-build@7.4.1(supports-color@10.2.2))(workbox-window@7.4.1):
|
||||
dependencies:
|
||||
debug: 4.4.3(supports-color@10.2.2)
|
||||
pretty-bytes: 6.1.1
|
||||
tinyglobby: 0.2.17
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
workbox-build: 7.4.1(supports-color@10.2.2)
|
||||
workbox-window: 7.4.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1):
|
||||
vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1):
|
||||
dependencies:
|
||||
lightningcss: 1.33.0
|
||||
picomatch: 4.0.7
|
||||
@@ -9472,21 +9703,21 @@ snapshots:
|
||||
rolldown: 1.2.14
|
||||
tinyglobby: 0.2.17
|
||||
optionalDependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
esbuild: 0.28.2
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.7.0
|
||||
terser: 5.49.0
|
||||
yaml: 2.9.1
|
||||
|
||||
vitefu@1.1.3(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
vitefu@1.1.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
optionalDependencies:
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
|
||||
vitest@5.0.5(@types/node@24.19.2)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.3)(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
vitest@5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(happy-dom@21.0.4)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)):
|
||||
dependencies:
|
||||
'@types/chai': 5.2.3
|
||||
'@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
'@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1))
|
||||
chai: 6.3.0
|
||||
es-module-lexer: 2.3.2
|
||||
expect-type: 1.4.0
|
||||
@@ -9497,12 +9728,12 @@ snapshots:
|
||||
tinybench: 6.2.2
|
||||
tinyexec: 1.3.1
|
||||
tinyglobby: 0.2.17
|
||||
vite: 8.3.4(@types/node@24.19.2)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.49.0)(yaml@2.9.1)
|
||||
why-is-node-running: 3.2.1
|
||||
optionalDependencies:
|
||||
'@types/node': 24.19.2
|
||||
'@types/node': 26.6.5
|
||||
'@vitest/coverage-v8': 5.0.5(vitest@5.0.5)
|
||||
happy-dom: 21.0.3
|
||||
happy-dom: 21.0.4
|
||||
transitivePeerDependencies:
|
||||
- msw
|
||||
|
||||
@@ -9788,13 +10019,13 @@ snapshots:
|
||||
'@cloudflare/workerd-linux-arm64': 1.20261019.1
|
||||
'@cloudflare/workerd-windows-64': 1.20261019.1
|
||||
|
||||
wrangler@4.151.3(@types/node@24.19.2):
|
||||
wrangler@4.151.3(@types/node@26.6.5):
|
||||
dependencies:
|
||||
'@cloudflare/kv-asset-handler': 0.5.0
|
||||
'@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261019.1)
|
||||
blake3-wasm: 2.1.5
|
||||
esbuild: 0.28.2
|
||||
miniflare: 5.20261019.1-beta(@types/node@24.19.2)
|
||||
miniflare: 5.20261019.1-beta(@types/node@26.6.5)
|
||||
path-to-regexp: 6.3.0
|
||||
unenv: 2.0.0-rc.24
|
||||
workerd: 1.20261019.1
|
||||
|
||||
+6
-3
@@ -12,9 +12,12 @@ allowBuilds:
|
||||
esbuild: true
|
||||
# Downloads the lefthook binary that installs our git hooks (docs/10 §4).
|
||||
lefthook: true
|
||||
# Cloudflare's local Worker runtime, pulled in by wrangler. SoftHarbor ships
|
||||
# pure static assets and never runs a Worker locally (docs/01 §1), so this
|
||||
# binary is dead weight. False is a decision, not an oversight.
|
||||
# Cloudflare's local Worker runtime, pulled in by wrangler. Its postinstall
|
||||
# (install.js) only verifies or re-fetches the binary, which already arrives
|
||||
# as the platform optionalDependency (@cloudflare/workerd-<os>-<arch>), so
|
||||
# `wrangler dev` runs the /api/verify Worker (D25) without it — checked
|
||||
# 2026-10-21. The Worker's tests run under Node (vitest). False is a
|
||||
# decision, not an oversight.
|
||||
workerd: false
|
||||
|
||||
# Security overrides. Both packages reach us only through
|
||||
|
||||
+38
-35
@@ -5,53 +5,56 @@
|
||||
* (docs/12 §5). L3 of the validation stack.
|
||||
*
|
||||
* node scripts/extract-urls.mjs → all entries (weekly sweep)
|
||||
* git diff --name-only … | node scripts/extract-urls.mjs --changed
|
||||
* → only the files named on stdin
|
||||
* git diff -U0 … | node scripts/extract-urls.mjs --added
|
||||
* → only URLs on lines the diff adds
|
||||
*
|
||||
* The --changed mode keeps PR feedback fast; the weekly job owns the full run.
|
||||
* The --added mode keeps PR feedback fast and about the PR: a link a pull
|
||||
* request adds or edits is checked, a link it merely sits next to is not.
|
||||
* Checking every link of every touched file (the old --changed mode) made a
|
||||
* re-check PR that rewrote 198 security blocks re-verify ~700 unrelated
|
||||
* vendor links, and any one vendor's bad minute (a 520, a 522, a timeout)
|
||||
* blocked it. The weekly job still owns the full run.
|
||||
*
|
||||
* The changed-file list arrives on stdin rather than from a `git diff` spawned
|
||||
* here. Spawning `git` meant resolving it through PATH (SonarCloud S4036), and
|
||||
* the old catch-all fallback turned ANY git failure into a silent full sweep of
|
||||
* ~1 150 URLs. The workflow now runs git itself under `set -euo pipefail`, so a
|
||||
* broken diff fails loudly where it happens.
|
||||
* The diff arrives on stdin rather than from a `git diff` spawned here.
|
||||
* Spawning `git` meant resolving it through PATH (SonarCloud S4036), and a
|
||||
* catch-all fallback would turn ANY git failure into a silent full sweep. The
|
||||
* workflow runs git itself under `set -euo pipefail`, so a broken diff fails
|
||||
* loudly where it happens.
|
||||
*/
|
||||
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
||||
import { basename, join } from 'node:path';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const APPS_DIR = join(process.cwd(), 'src/data/apps');
|
||||
const changedOnly = process.argv.includes('--changed');
|
||||
|
||||
/** Plain UTF-16 order — identical to the default sort, but explicit (S2871). */
|
||||
const byCodeUnit = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
||||
|
||||
let files = existsSync(APPS_DIR) ? readdirSync(APPS_DIR).filter((f) => f.endsWith('.json')) : [];
|
||||
|
||||
if (changedOnly) {
|
||||
const changed = new Set(
|
||||
readFileSync(0, 'utf8')
|
||||
.split('\n')
|
||||
.map((l) => l.trim())
|
||||
.filter(Boolean)
|
||||
.map((p) => basename(p)),
|
||||
);
|
||||
files = files.filter((f) => changed.has(f));
|
||||
}
|
||||
|
||||
const urls = new Set();
|
||||
for (const file of files) {
|
||||
let app;
|
||||
try {
|
||||
app = JSON.parse(readFileSync(join(APPS_DIR, file), 'utf8'));
|
||||
} catch (err) {
|
||||
// validate:data reports malformed JSON with context; here it must not
|
||||
// abort the whole sweep, but it must not pass unnoticed either.
|
||||
console.error(`extract-urls: skipping ${file} (${err.message})`);
|
||||
process.exitCode = 1;
|
||||
continue;
|
||||
|
||||
if (process.argv.includes('--added')) {
|
||||
// Unified diff: an added line starts with "+", the file header with "+++".
|
||||
for (const line of readFileSync(0, 'utf8').split('\n')) {
|
||||
if (!line.startsWith('+') || line.startsWith('+++')) continue;
|
||||
for (const [, url] of line.matchAll(/"(https:\/\/[^"\s]+)"/g)) urls.add(url);
|
||||
}
|
||||
} else {
|
||||
const files = existsSync(APPS_DIR)
|
||||
? readdirSync(APPS_DIR).filter((f) => f.endsWith('.json'))
|
||||
: [];
|
||||
for (const file of files) {
|
||||
let app;
|
||||
try {
|
||||
app = JSON.parse(readFileSync(join(APPS_DIR, file), 'utf8'));
|
||||
} catch (err) {
|
||||
// validate:data reports malformed JSON with context; here it must not
|
||||
// abort the whole sweep, but it must not pass unnoticed either.
|
||||
console.error(`extract-urls: skipping ${file} (${err.message})`);
|
||||
process.exitCode = 1;
|
||||
continue;
|
||||
}
|
||||
for (const v of Object.values(app.links ?? {})) if (v) urls.add(v);
|
||||
if (app.security?.evidence) urls.add(app.security.evidence);
|
||||
}
|
||||
for (const v of Object.values(app.links ?? {})) if (v) urls.add(v);
|
||||
if (app.security?.evidence) urls.add(app.security.evidence);
|
||||
}
|
||||
|
||||
for (const u of [...urls].sort(byCodeUnit)) console.log(u);
|
||||
@@ -0,0 +1,55 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 (SkullMute)
|
||||
//
|
||||
// `pnpm icons` — run for real in a throwaway tree. The PNG bytes depend on
|
||||
// sharp's version, so they are checked by their headers; the vector mark is
|
||||
// plain text and must equal the committed public/favicon.svg, which would
|
||||
// otherwise drift from the script that claims to produce it.
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { project, run } from './fixture';
|
||||
|
||||
/** Width and height from a PNG's IHDR chunk. */
|
||||
const pngSize = (buf: Buffer) => [buf.readUInt32BE(16), buf.readUInt32BE(20)];
|
||||
|
||||
describe('gen-icons.mjs', () => {
|
||||
it('writes every icon from the one vector mark', () => {
|
||||
const root = project({});
|
||||
const r = run('gen-icons.mjs', root);
|
||||
expect(r.code).toBe(0);
|
||||
expect(r.out).toContain('icons — wrote favicon.svg');
|
||||
|
||||
const svg = readFileSync(join(root, 'public/favicon.svg'), 'utf8');
|
||||
expect(svg).toBe(readFileSync(join(process.cwd(), 'public/favicon.svg'), 'utf8'));
|
||||
|
||||
const pngs: Array<[string, number]> = [
|
||||
['icons/icon-192.png', 192],
|
||||
['icons/icon-512.png', 512],
|
||||
['icons/maskable-512.png', 512],
|
||||
['apple-touch-icon.png', 180],
|
||||
];
|
||||
for (const [file, size] of pngs) {
|
||||
const buf = readFileSync(join(root, 'public', file));
|
||||
expect(buf.subarray(1, 4).toString('latin1'), file).toBe('PNG');
|
||||
expect(pngSize(buf), file).toEqual([size, size]);
|
||||
}
|
||||
});
|
||||
|
||||
it('packs 16, 32 and 48 px PNGs into favicon.ico', () => {
|
||||
const root = project({});
|
||||
expect(run('gen-icons.mjs', root).code).toBe(0);
|
||||
|
||||
const ico = readFileSync(join(root, 'public/favicon.ico'));
|
||||
expect(ico.readUInt16LE(2)).toBe(1); // type: icon
|
||||
expect(ico.readUInt16LE(4)).toBe(3); // three images
|
||||
const entries = [0, 1, 2].map((i) => 6 + 16 * i);
|
||||
expect(entries.map((e) => ico.readUInt8(e))).toEqual([16, 32, 48]);
|
||||
// Each directory entry points at a PNG inside the file.
|
||||
for (const e of entries) {
|
||||
const offset = ico.readUInt32LE(e + 12);
|
||||
expect(ico.subarray(offset + 1, offset + 4).toString('latin1')).toBe('PNG');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -71,12 +71,33 @@ describe('extract-urls', () => {
|
||||
expect(r.stdout).toBe('https://a.test/\nhttps://b.test/\nhttps://vt.test/a\n');
|
||||
});
|
||||
|
||||
it('limits itself to the files named on stdin with --changed', () => {
|
||||
const r = run('extract-urls.mjs', project(apps), {
|
||||
args: ['--changed'],
|
||||
input: 'src/data/apps/b.json\nREADME.md\n',
|
||||
});
|
||||
expect(r.stdout).toBe('https://a.test/\nhttps://b.test/\n');
|
||||
it('with --added, checks only the URLs on lines a diff adds', () => {
|
||||
// A re-check PR rewrites evidence; a data PR adds a whole new file.
|
||||
const diff = [
|
||||
'diff --git a/src/data/apps/a.json b/src/data/apps/a.json',
|
||||
'--- a/src/data/apps/a.json',
|
||||
'+++ b/src/data/apps/a.json',
|
||||
'@@ -19,2 +19,2 @@',
|
||||
'- "evidence": "https://vt.test/old",',
|
||||
'+ "evidence": "https://vt.test/new",',
|
||||
'- "checkedAt": "2026-07-30"',
|
||||
'+ "checkedAt": "2026-10-23"',
|
||||
'diff --git a/src/data/apps/new.json b/src/data/apps/new.json',
|
||||
'+++ b/src/data/apps/new.json',
|
||||
'+ "homepage": "https://new.test",',
|
||||
'+ "repo": null,',
|
||||
'+ "download": "https://new.test/get?os=win",',
|
||||
' unchanged "https://context.test/"',
|
||||
].join('\n');
|
||||
const r = run('extract-urls.mjs', project(apps), { args: ['--added'], input: diff });
|
||||
expect(r.code).toBe(0);
|
||||
expect(r.stdout).toBe('https://new.test\nhttps://new.test/get?os=win\nhttps://vt.test/new\n');
|
||||
});
|
||||
|
||||
it('with --added and an empty diff, prints nothing', () => {
|
||||
const r = run('extract-urls.mjs', project(apps), { args: ['--added'], input: '' });
|
||||
expect(r.code).toBe(0);
|
||||
expect(r.stdout).toBe('');
|
||||
});
|
||||
|
||||
it('keeps going past a malformed file, but fails the run', () => {
|
||||
|
||||
@@ -0,0 +1,499 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 (SkullMute)
|
||||
/**
|
||||
* VirusTotal re-check — docs/09 §6 step 5 made assisted, docs/12 §4b.
|
||||
*
|
||||
* Every entry's security line is a DATED claim ("no known warnings as of
|
||||
* <checkedAt>", hard rule 4), so it is only honest while the date is recent.
|
||||
* This re-scans each entry's `links.download` page on VirusTotal and rewrites
|
||||
* ONLY its three security lines:
|
||||
*
|
||||
* - no engine reports it malicious or suspicious → fresh `evidence` and
|
||||
* `checkedAt`, status unchanged. A slug the maintainer lists in
|
||||
* VT_PROMOTE goes `unverified` → `clean`: that is their docs/09 §6 call,
|
||||
* never the script's;
|
||||
* - any detection → a `clean` entry drops to `unverified` (it no longer has
|
||||
* "no known warnings") and is reported for a tracking issue; an
|
||||
* `unverified` entry just gets the fresh scan.
|
||||
*
|
||||
* It never sets `flagged` — quarantine stays a human `pnpm quarantine`
|
||||
* (hard rule 5) — and never touches `addedAt`/`updatedAt`: the feed orders by
|
||||
* addedAt and notify.py announces whatever it has not seen (docs/13 §5).
|
||||
* Files are patched line by line, not re-serialised, so Prettier's layout
|
||||
* survives byte for byte.
|
||||
*
|
||||
* Callers: .github/workflows/vt-recheck.yml — daily on main (a PR accumulates
|
||||
* the results), or dispatched on a data branch as a preview — and a
|
||||
* maintainer with VT_API_KEY set. Options come from the environment so a
|
||||
* workflow never interpolates input into a command line:
|
||||
*
|
||||
* VT_API_KEY required; without it the run is a no-op that says so
|
||||
* VT_SLUGS scan these first (space or comma separated)
|
||||
* VT_PROMOTE move these unverified → clean if their scan is clean
|
||||
* VT_ONLY_LISTED "1": scan only VT_SLUGS — or, if empty, the entries that
|
||||
* have never been scanned (a data PR's new apps)
|
||||
* VT_MAX_AGE re-scan checks older than this many days (default 90)
|
||||
* VT_BUDGET requests this run may spend (default 440, at most 500)
|
||||
* VT_CARRY data dir of the still-open re-check PR (see carry())
|
||||
* VT_SUMMARY write the markdown report here (the PR body)
|
||||
* VT_REVIEW_JSON write the detections here, for the issue step
|
||||
* VT_INTERVAL_MS pacing between requests (default 15 500 — tests set 0)
|
||||
*
|
||||
* Public API limits: 4 requests a minute and 500 a day, and VirusTotal counts
|
||||
* every call. One URL costs a submission plus at least one read, so at most
|
||||
* half the budget is spent on submissions — the reads must always fit.
|
||||
*/
|
||||
import { createHash } from 'node:crypto';
|
||||
import { appendFileSync, existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const API = 'https://www.virustotal.com/api/v3';
|
||||
const GUI = 'https://www.virustotal.com/gui/url/';
|
||||
const SLUG_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
||||
const EVIDENCE_RE = /^https:\/\/www\.virustotal\.com\/gui\/url\/([0-9a-f]{64})$/;
|
||||
const DAY_MS = 86_400_000;
|
||||
/** A drifted scan is re-run at most weekly, so a canonicalisation miss costs ≤ 2 requests a week. */
|
||||
const DRIFT_GRACE_DAYS = 7;
|
||||
const MAX_POLLS = 3;
|
||||
const QUOTA_BACKOFF_MS = 60_000;
|
||||
const DEFAULTS = { maxAge: 90, budget: 440, intervalMs: 15_500 };
|
||||
|
||||
/** The API key was refused: nothing else this run does can succeed. */
|
||||
export class AuthError extends Error {}
|
||||
|
||||
/**
|
||||
* VirusTotal's URL identifier is the SHA-256 of its canonical form. WHATWG
|
||||
* parsing does what the recorded scans show: lowercase scheme and host, an
|
||||
* empty path becomes "/", the query is kept — and so is the fragment. The
|
||||
* API keeps `#download` in the id (measured on the first batch-2 run, 2026-10-23);
|
||||
* only the 2026-07-30 scans, submitted from a browser that never sends the
|
||||
* fragment, lack it, so those six entries count as drifted until re-scanned.
|
||||
*/
|
||||
export function canonicalUrl(raw) {
|
||||
return new URL(raw).href;
|
||||
}
|
||||
|
||||
export const urlId = (raw) => createHash('sha256').update(canonicalUrl(raw)).digest('hex');
|
||||
|
||||
const daysBetween = (from, to) => Math.round((Date.parse(to) - Date.parse(from)) / DAY_MS);
|
||||
|
||||
/** Slugs from "a b,c" — invalid ones are reported, never passed on. */
|
||||
export function parseSlugs(value, log = () => {}) {
|
||||
const slugs = [];
|
||||
for (const s of String(value ?? '').split(/[\s,]+/)) {
|
||||
if (!s) continue;
|
||||
if (SLUG_RE.test(s)) slugs.push(s);
|
||||
else log(`vt-recheck: ignoring "${s}" — not a valid slug`);
|
||||
}
|
||||
return [...new Set(slugs)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrites the three lines of the `security` object and nothing else. The
|
||||
* object holds no nested braces (docs/04 §2), so `[^}]*` cannot overrun it.
|
||||
*/
|
||||
export function patchSecurity(text, security) {
|
||||
return text.replace(/("security":\s*\{)([^}]*)(\})/, (_, open, body, close) => {
|
||||
const next = body
|
||||
.replace(/("status":\s*)"[^"]*"/, `$1"${security.status}"`)
|
||||
.replace(/("evidence":\s*)(?:null|"[^"]*")/, `$1${JSON.stringify(security.evidence)}`)
|
||||
.replace(/("checkedAt":\s*)"[^"]*"/, `$1"${security.checkedAt}"`);
|
||||
return open + next + close;
|
||||
});
|
||||
}
|
||||
|
||||
/** Everything but `security`, for proving a patch touched nothing else. */
|
||||
const rest = (app) => JSON.stringify({ ...app, security: undefined });
|
||||
|
||||
function loadEntries(appsDir, log) {
|
||||
if (!existsSync(appsDir)) return [];
|
||||
const entries = [];
|
||||
for (const file of readdirSync(appsDir).filter((f) => f.endsWith('.json'))) {
|
||||
const slug = file.slice(0, -'.json'.length);
|
||||
const path = join(appsDir, file);
|
||||
const text = readFileSync(path, 'utf8');
|
||||
try {
|
||||
const app = JSON.parse(text);
|
||||
if (SLUG_RE.test(slug) && app?.security && app?.links?.download) {
|
||||
entries.push({ slug, path, text, app });
|
||||
} else log(`vt-recheck: skipping ${file} — not a catalogue entry`);
|
||||
} catch (e) {
|
||||
log(`vt-recheck: skipping unparseable ${file}: ${e.message}`);
|
||||
}
|
||||
}
|
||||
return entries.sort((a, b) => (a.slug < b.slug ? -1 : 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* The daily run lands in ONE pull request that stays open until merged. Its
|
||||
* branch holds the earlier days' results; without this, every run would
|
||||
* re-scan the same stalest entries, because main still shows them as stale.
|
||||
* A carried security block is adopted only when the download link it scanned
|
||||
* is still the one on main and its check is newer than main's.
|
||||
*/
|
||||
export function carry(entries, carryDir) {
|
||||
const carried = [];
|
||||
if (!carryDir || !existsSync(carryDir)) return carried;
|
||||
for (const entry of entries) {
|
||||
const path = join(carryDir, `${entry.slug}.json`);
|
||||
if (!existsSync(path)) continue;
|
||||
let theirs;
|
||||
try {
|
||||
theirs = JSON.parse(readFileSync(path, 'utf8'));
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
const sec = theirs?.security;
|
||||
if (
|
||||
theirs?.links?.download !== entry.app.links.download ||
|
||||
typeof sec?.checkedAt !== 'string' ||
|
||||
!(sec.checkedAt > entry.app.security.checkedAt) ||
|
||||
sec.status === 'flagged'
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
const security = {
|
||||
status: sec.status,
|
||||
evidence: sec.evidence ?? null,
|
||||
checkedAt: sec.checkedAt,
|
||||
};
|
||||
entry.text = patchSecurity(entry.text, security);
|
||||
entry.app = { ...entry.app, security };
|
||||
entry.dirty = true;
|
||||
carried.push(entry.slug);
|
||||
}
|
||||
return carried;
|
||||
}
|
||||
|
||||
/** True when the linked scan is of some other URL than today's download link. */
|
||||
function drifted(entry) {
|
||||
const id = EVIDENCE_RE.exec(entry.app.security.evidence ?? '')?.[1];
|
||||
return id !== undefined && id !== urlId(entry.app.links.download);
|
||||
}
|
||||
|
||||
/** Who gets scanned this run, in priority order. */
|
||||
export function select(entries, { slugs, onlyListed, maxAge, today }) {
|
||||
const bySlug = new Map(entries.map((e) => [e.slug, e]));
|
||||
const listed = slugs.map((s) => bySlug.get(s)).filter(Boolean);
|
||||
const scannable = entries.filter((e) => e.app.security.status !== 'flagged');
|
||||
const neverScanned = scannable.filter((e) => e.app.security.evidence === null);
|
||||
if (onlyListed) return listed.length > 0 ? listed : neverScanned;
|
||||
|
||||
const age = (e) => daysBetween(e.app.security.checkedAt, today);
|
||||
const due = [
|
||||
...listed,
|
||||
...neverScanned,
|
||||
...scannable.filter((e) => drifted(e) && age(e) >= DRIFT_GRACE_DAYS),
|
||||
// Oldest check first; Array#sort is stable, so equal dates keep slug order.
|
||||
...scannable.filter((e) => age(e) > maxAge).sort((a, b) => age(b) - age(a)),
|
||||
];
|
||||
return [...new Set(due)];
|
||||
}
|
||||
|
||||
/** The VirusTotal client: pacing, the request budget, and the quota rules. */
|
||||
function client({ apiKey, fetch, sleep, now, intervalMs, budget }) {
|
||||
let spent = 0;
|
||||
let last = -Infinity;
|
||||
const state = { quotaHit: false };
|
||||
|
||||
async function once(method, path, body) {
|
||||
const wait = last + intervalMs - now();
|
||||
if (wait > 0) await sleep(wait);
|
||||
last = now();
|
||||
spent++;
|
||||
return fetch(`${API}${path}`, {
|
||||
method,
|
||||
headers: {
|
||||
'x-apikey': apiKey,
|
||||
accept: 'application/json',
|
||||
...(body ? { 'content-type': 'application/x-www-form-urlencoded' } : {}),
|
||||
},
|
||||
...(body ? { body } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** One API call, with a single back-off on 429 (the per-minute limit). */
|
||||
async function call(method, path, body) {
|
||||
let res = await once(method, path, body);
|
||||
if (res.status === 429 && spent < budget) {
|
||||
await sleep(QUOTA_BACKOFF_MS);
|
||||
res = await once(method, path, body);
|
||||
}
|
||||
if (res.status === 429) {
|
||||
state.quotaHit = true;
|
||||
throw new Error('quota exceeded');
|
||||
}
|
||||
if (res.status === 401 || res.status === 403) {
|
||||
throw new AuthError(`VirusTotal refused the API key (HTTP ${res.status})`);
|
||||
}
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
return {
|
||||
state,
|
||||
left: () => budget - spent,
|
||||
spent: () => spent,
|
||||
/** POST /urls → the analysis id. */
|
||||
submit: async (url) =>
|
||||
(await call('POST', '/urls', `url=${encodeURIComponent(url)}`))?.data?.id,
|
||||
/** GET /analyses/{id} → `{ data: { attributes }, meta: { url_info } }`. */
|
||||
read: async (id) => call('GET', `/analyses/${encodeURIComponent(id)}`),
|
||||
};
|
||||
}
|
||||
|
||||
const why = (vt, e) => (vt.state.quotaHit ? 'daily quota' : e.message);
|
||||
|
||||
/** Pass 1: submit the queue, keeping half the budget for the reads. */
|
||||
async function submitAll(vt, queue, outcome) {
|
||||
const pending = [];
|
||||
const most = Math.floor(vt.left() / 2);
|
||||
for (const entry of queue) {
|
||||
if (vt.state.quotaHit || pending.length >= most) {
|
||||
outcome(entry, { kind: 'skipped', reason: vt.state.quotaHit ? 'daily quota' : 'budget' });
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
const id = await vt.submit(entry.app.links.download);
|
||||
if (typeof id !== 'string') throw new Error('no analysis id');
|
||||
pending.push({ entry, id, polls: 0 });
|
||||
} catch (e) {
|
||||
if (e instanceof AuthError) throw e;
|
||||
outcome(entry, { kind: 'error', reason: why(vt, e) });
|
||||
}
|
||||
}
|
||||
return pending;
|
||||
}
|
||||
|
||||
/** Pass 2: read each analysis; one still queued goes to the back of the line. */
|
||||
async function readAll(vt, pending, outcome) {
|
||||
while (pending.length > 0) {
|
||||
const item = pending.shift();
|
||||
if (vt.state.quotaHit || vt.left() < 1) {
|
||||
outcome(item.entry, {
|
||||
kind: 'skipped',
|
||||
reason: vt.state.quotaHit ? 'daily quota' : 'budget',
|
||||
});
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
const body = await vt.read(item.id);
|
||||
const attributes = body?.data?.attributes;
|
||||
if (attributes?.status !== 'completed') {
|
||||
item.polls++;
|
||||
if (item.polls < MAX_POLLS) pending.push(item);
|
||||
else outcome(item.entry, { kind: 'error', reason: 'analysis still queued' });
|
||||
continue;
|
||||
}
|
||||
// The URL's id rides along in `meta`; the analysis id ("u-<sha256>-<ts>")
|
||||
// carries it too, should `meta` ever be missing.
|
||||
const id = body?.meta?.url_info?.id ?? /^u-([0-9a-f]{64})-\d+$/.exec(item.id)?.[1];
|
||||
if (typeof id !== 'string' || !/^[0-9a-f]{64}$/.test(id)) throw new Error('no URL id');
|
||||
const stats = attributes.stats ?? {};
|
||||
const verdicts = ['harmless', 'undetected', 'malicious', 'suspicious'];
|
||||
// Every engine timing out is not "no detections" — it is no answer.
|
||||
if (verdicts.every((k) => !stats[k])) throw new Error('no engine returned a verdict');
|
||||
outcome(item.entry, { kind: 'scanned', id, stats });
|
||||
} catch (e) {
|
||||
if (e instanceof AuthError) throw e;
|
||||
outcome(item.entry, { kind: 'error', reason: why(vt, e) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** The status rules from the header, as one decision. */
|
||||
export function decide(status, stats, promote) {
|
||||
const detections = (stats.malicious ?? 0) + (stats.suspicious ?? 0);
|
||||
if (detections > 0) return { status: status === 'clean' ? 'unverified' : status, review: true };
|
||||
if (promote && status === 'unverified') return { status: 'clean', review: false };
|
||||
return { status, review: false };
|
||||
}
|
||||
|
||||
function apply(entry, result, { today, promote }) {
|
||||
const before = entry.app.security;
|
||||
const { status, review } = decide(before.status, result.stats, promote.has(entry.slug));
|
||||
const security = { status, evidence: `${GUI}${result.id}`, checkedAt: today };
|
||||
const text = patchSecurity(entry.text, security);
|
||||
const app = JSON.parse(text);
|
||||
if (rest(app) !== rest(entry.app) || JSON.stringify(app.security) !== JSON.stringify(security)) {
|
||||
throw new Error(`patch of ${entry.slug} did not apply cleanly`);
|
||||
}
|
||||
entry.text = text;
|
||||
entry.app = app;
|
||||
entry.dirty = true;
|
||||
return { was: before.status, status, review };
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-checks the catalogue in `appsDir`. Pure apart from the files it
|
||||
* rewrites and the `fetch` it is given, so tests drive it in-process.
|
||||
*/
|
||||
export async function recheck(options) {
|
||||
const {
|
||||
appsDir,
|
||||
apiKey,
|
||||
fetch = globalThis.fetch,
|
||||
sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
||||
now = Date.now,
|
||||
today = new Date().toISOString().slice(0, 10),
|
||||
slugs = [],
|
||||
promote = [],
|
||||
onlyListed = false,
|
||||
maxAge = DEFAULTS.maxAge,
|
||||
budget = DEFAULTS.budget,
|
||||
intervalMs = DEFAULTS.intervalMs,
|
||||
carryDir,
|
||||
log = () => {},
|
||||
} = options;
|
||||
|
||||
const entries = loadEntries(appsDir, log);
|
||||
const carried = carry(entries, carryDir);
|
||||
const promoted = new Set(promote);
|
||||
const queue = select(entries, {
|
||||
slugs: [...new Set([...slugs, ...promote])],
|
||||
onlyListed,
|
||||
maxAge,
|
||||
today,
|
||||
});
|
||||
const vt = client({
|
||||
apiKey,
|
||||
fetch,
|
||||
sleep,
|
||||
now,
|
||||
intervalMs,
|
||||
budget: Math.min(Math.max(budget, 0), 500),
|
||||
});
|
||||
|
||||
const rows = [];
|
||||
const outcome = (entry, result) => {
|
||||
if (result.kind !== 'scanned') {
|
||||
rows.push({ slug: entry.slug, ...result });
|
||||
return;
|
||||
}
|
||||
const detections = {
|
||||
malicious: result.stats.malicious ?? 0,
|
||||
suspicious: result.stats.suspicious ?? 0,
|
||||
};
|
||||
const change = apply(entry, result, { today, promote: promoted });
|
||||
const mismatch = result.id !== urlId(entry.app.links.download);
|
||||
if (mismatch) log(`vt-recheck: ${entry.slug}: VirusTotal's URL id differs from the local hash`);
|
||||
rows.push({
|
||||
slug: entry.slug,
|
||||
kind: 'scanned',
|
||||
evidence: `${GUI}${result.id}`,
|
||||
...detections,
|
||||
...change,
|
||||
mismatch,
|
||||
});
|
||||
};
|
||||
|
||||
const pending = await submitAll(vt, queue, outcome);
|
||||
await readAll(vt, pending, outcome);
|
||||
|
||||
for (const entry of entries.filter((e) => e.dirty)) writeFileSync(entry.path, entry.text);
|
||||
return {
|
||||
rows,
|
||||
carried,
|
||||
changed: entries.filter((e) => e.dirty).length,
|
||||
review: rows.filter((r) => r.review),
|
||||
spent: vt.spent(),
|
||||
quotaHit: vt.state.quotaHit,
|
||||
selected: queue.length,
|
||||
};
|
||||
}
|
||||
|
||||
function resultCell(r) {
|
||||
if (r.kind !== 'scanned') return `not checked (${r.reason})`;
|
||||
const found = r.malicious + r.suspicious > 0;
|
||||
const text = found ? `⚠ ${r.malicious} malicious, ${r.suspicious} suspicious` : 'no detections';
|
||||
return r.mismatch ? `${text} · id ≠ local hash` : text;
|
||||
}
|
||||
|
||||
function statusCell(r) {
|
||||
if (!r.status) return '—';
|
||||
return r.was !== r.status ? `${r.was} → **${r.status}**` : r.status;
|
||||
}
|
||||
|
||||
/** The PR body / job summary. */
|
||||
export function summary(report, { today }) {
|
||||
const lines = [
|
||||
`VirusTotal re-check, ${today} (docs/12 §4b). Each row re-scanned the entry's`,
|
||||
'`links.download` page; only the three `security` lines change.',
|
||||
'',
|
||||
`- scanned: ${report.rows.filter((r) => r.kind === 'scanned').length} of ${report.selected} due · requests: ${report.spent}` +
|
||||
(report.quotaHit ? ' · **stopped at the daily quota** — the next run continues' : ''),
|
||||
`- needs review (detections): ${report.review.length}` +
|
||||
(report.review.length ? ` — ${report.review.map((r) => `\`${r.slug}\``).join(', ')}` : ''),
|
||||
];
|
||||
if (report.carried.length) {
|
||||
lines.push(
|
||||
`- carried from the open re-check PR: ${report.carried.length} (${report.carried.join(', ')})`,
|
||||
);
|
||||
}
|
||||
lines.push('', '| entry | result | status | scan |', '|---|---|---|---|');
|
||||
for (const r of report.rows) {
|
||||
const scan = r.evidence ? `[scan](${r.evidence})` : '—';
|
||||
lines.push(`| \`${r.slug}\` | ${resultCell(r)} | ${statusCell(r)} | ${scan} |`);
|
||||
}
|
||||
lines.push(
|
||||
'',
|
||||
'A detection never flags or removes anything: `clean` becomes `unverified` and an',
|
||||
'issue asks the maintainer to decide (docs/09 §6; a confirmed one goes through',
|
||||
"`pnpm quarantine`). This reports what VirusTotal's engines said on the day —",
|
||||
'not a safety guarantee (hard rule 4).',
|
||||
);
|
||||
return lines.join('\n') + '\n';
|
||||
}
|
||||
|
||||
function int(value, fallback) {
|
||||
const n = Number.parseInt(String(value ?? ''), 10);
|
||||
return Number.isFinite(n) && n >= 0 ? n : fallback;
|
||||
}
|
||||
|
||||
export async function main(env = process.env, cwd = process.cwd()) {
|
||||
const out = (key, value) => {
|
||||
if (env['GITHUB_OUTPUT']) appendFileSync(env['GITHUB_OUTPUT'], `${key}=${value}\n`);
|
||||
};
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
const apiKey = env['VT_API_KEY'];
|
||||
if (!apiKey) {
|
||||
console.log(
|
||||
'vt-recheck: VT_API_KEY is not set — nothing scanned (forks and Dependabot have no secrets)',
|
||||
);
|
||||
out('changed', 0);
|
||||
out('review', '');
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
const report = await recheck({
|
||||
appsDir: join(cwd, 'src/data/apps'),
|
||||
apiKey,
|
||||
today,
|
||||
slugs: parseSlugs(env['VT_SLUGS'], console.error),
|
||||
promote: parseSlugs(env['VT_PROMOTE'], console.error),
|
||||
onlyListed: env['VT_ONLY_LISTED'] === '1',
|
||||
maxAge: int(env['VT_MAX_AGE'], DEFAULTS.maxAge),
|
||||
budget: int(env['VT_BUDGET'], DEFAULTS.budget),
|
||||
intervalMs: int(env['VT_INTERVAL_MS'], DEFAULTS.intervalMs),
|
||||
carryDir: env['VT_CARRY'] || undefined,
|
||||
log: console.error,
|
||||
});
|
||||
const text = summary(report, { today });
|
||||
if (env['VT_SUMMARY']) writeFileSync(env['VT_SUMMARY'], text);
|
||||
if (env['VT_REVIEW_JSON'])
|
||||
writeFileSync(env['VT_REVIEW_JSON'], JSON.stringify(report.review, null, 2));
|
||||
console.log(text);
|
||||
if (report.quotaHit)
|
||||
console.log('::warning::VirusTotal quota reached — the next run continues');
|
||||
out('changed', report.changed);
|
||||
out('review', report.review.map((r) => r.slug).join(' '));
|
||||
return 0;
|
||||
} catch (e) {
|
||||
console.error(`vt-recheck: ${e.message}`);
|
||||
out('changed', 0);
|
||||
out('review', '');
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (import.meta.main) process.exitCode = await main();
|
||||
@@ -0,0 +1,629 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 (SkullMute)
|
||||
//
|
||||
// vt-recheck.mjs, driven in-process against a fake VirusTotal (the script
|
||||
// takes `fetch` as a dependency, like worker/verify.ts), plus one real child
|
||||
// run for the CLI path. That run gets NODE_V8_COVERAGE='' and VT_API_KEY='':
|
||||
// Vitest merges a child's coverage of a file it also imported wrongly, and a
|
||||
// developer's own key must never reach the real API from a test.
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { project, run } from './fixture';
|
||||
import {
|
||||
AuthError,
|
||||
canonicalUrl,
|
||||
decide,
|
||||
main,
|
||||
parseSlugs,
|
||||
patchSecurity,
|
||||
recheck,
|
||||
select,
|
||||
summary,
|
||||
urlId,
|
||||
} from './vt-recheck.mjs';
|
||||
|
||||
const TODAY = '2026-10-23';
|
||||
/** A check more than 90 days before TODAY: due by age alone. */
|
||||
const STALE = '2026-06-01';
|
||||
const GUI = 'https://www.virustotal.com/gui/url/';
|
||||
const SEVEN_ZIP = readFileSync(join(process.cwd(), 'src/data/apps/7-zip.json'), 'utf8');
|
||||
|
||||
interface Security {
|
||||
status: 'clean' | 'unverified' | 'flagged';
|
||||
evidence: string | null;
|
||||
checkedAt: string;
|
||||
}
|
||||
|
||||
/** An entry in the catalogue's own layout (Prettier: inline arrays). */
|
||||
function entry(download: string, security: Partial<Security> = {}): string {
|
||||
const sec: Security = {
|
||||
status: 'clean',
|
||||
evidence: `${GUI}${urlId(download)}`,
|
||||
checkedAt: STALE,
|
||||
...security,
|
||||
};
|
||||
return `{
|
||||
"name": "App",
|
||||
"developer": "Dev",
|
||||
"logo": "monogram",
|
||||
"summary": { "en": "An app used by tests to exercise the script.", "vi": "Ứng dụng dùng cho kiểm thử." },
|
||||
"categories": ["utilities"],
|
||||
"tags": ["portable"],
|
||||
"platforms": ["windows"],
|
||||
"pricing": "free",
|
||||
"license": null,
|
||||
"links": {
|
||||
"homepage": "https://example.test",
|
||||
"repo": null,
|
||||
"download": "${download}"
|
||||
},
|
||||
"security": {
|
||||
"status": "${sec.status}",
|
||||
"evidence": ${JSON.stringify(sec.evidence)},
|
||||
"checkedAt": "${sec.checkedAt}"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
const dl = (slug: string) => `https://${slug}.example.test/download`;
|
||||
|
||||
function tree(files: Record<string, string>): { root: string; appsDir: string } {
|
||||
const prefixed = Object.fromEntries(
|
||||
Object.entries(files).map(([slug, text]) => [`src/data/apps/${slug}.json`, text]),
|
||||
);
|
||||
const root = project(prefixed);
|
||||
return { root, appsDir: join(root, 'src/data/apps') };
|
||||
}
|
||||
|
||||
const read = (appsDir: string, slug: string) =>
|
||||
JSON.parse(readFileSync(join(appsDir, `${slug}.json`), 'utf8')) as { security: Security };
|
||||
|
||||
interface Verdict {
|
||||
malicious?: number;
|
||||
suspicious?: number;
|
||||
queued?: number; // reads that answer "queued" before "completed"
|
||||
submitStatus?: number; // HTTP status of the POST
|
||||
readStatus?: number;
|
||||
empty?: boolean; // every engine timed out
|
||||
noMeta?: boolean;
|
||||
id?: string; // URL id VirusTotal reports, if not the local hash
|
||||
}
|
||||
|
||||
/** A fake VirusTotal v3: POST /urls and GET /analyses/{id}. */
|
||||
function fakeVt(verdicts: Record<string, Verdict> = {}, opts: { status429?: number[] } = {}) {
|
||||
const calls: Array<{ method: string; path: string; key: string | null }> = [];
|
||||
const byAnalysis = new Map<string, { url: string; reads: number }>();
|
||||
let n = 0;
|
||||
const fetch = vi.fn(async (input: string, init: RequestInit = {}) => {
|
||||
n++;
|
||||
const url = new URL(input);
|
||||
const headers = new Headers(init.headers);
|
||||
calls.push({ method: init.method ?? 'GET', path: url.pathname, key: headers.get('x-apikey') });
|
||||
if (opts.status429?.includes(n))
|
||||
return Response.json({ error: { code: 'QuotaExceededError' } }, { status: 429 });
|
||||
|
||||
if (init.method === 'POST' && url.pathname === '/api/v3/urls') {
|
||||
const target = new URLSearchParams(String(init.body)).get('url') ?? '';
|
||||
const v = verdicts[target] ?? {};
|
||||
if (v.submitStatus) return new Response('nope', { status: v.submitStatus });
|
||||
const id = `u-${urlId(target)}-1761177600`;
|
||||
byAnalysis.set(id, { url: target, reads: 0 });
|
||||
return Response.json({ data: { type: 'analysis', id } });
|
||||
}
|
||||
const match = /^\/api\/v3\/analyses\/(.+)$/.exec(url.pathname);
|
||||
const analysis = match ? byAnalysis.get(decodeURIComponent(match[1] ?? '')) : undefined;
|
||||
if (!analysis) return new Response('not found', { status: 404 });
|
||||
const v = verdicts[analysis.url] ?? {};
|
||||
if (v.readStatus) return new Response('nope', { status: v.readStatus });
|
||||
analysis.reads++;
|
||||
if (analysis.reads <= (v.queued ?? 0)) {
|
||||
return Response.json({ data: { attributes: { status: 'queued', stats: {} } } });
|
||||
}
|
||||
const stats = v.empty
|
||||
? { harmless: 0, undetected: 0, malicious: 0, suspicious: 0, timeout: 90 }
|
||||
: {
|
||||
harmless: 60,
|
||||
undetected: 25,
|
||||
malicious: v.malicious ?? 0,
|
||||
suspicious: v.suspicious ?? 0,
|
||||
};
|
||||
return Response.json({
|
||||
data: { attributes: { status: 'completed', stats } },
|
||||
...(v.noMeta
|
||||
? {}
|
||||
: { meta: { url_info: { id: v.id ?? urlId(analysis.url), url: analysis.url } } }),
|
||||
});
|
||||
});
|
||||
return { fetch, calls };
|
||||
}
|
||||
|
||||
function opts(appsDir: string, fetch: unknown, extra: Record<string, unknown> = {}) {
|
||||
return {
|
||||
appsDir,
|
||||
apiKey: 'test-key',
|
||||
fetch,
|
||||
sleep: vi.fn(async () => {}),
|
||||
now: () => 0,
|
||||
today: TODAY,
|
||||
intervalMs: 0,
|
||||
maxAge: 90,
|
||||
...extra,
|
||||
};
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
describe('canonicalUrl / urlId — VirusTotal URL identifiers', () => {
|
||||
it('reproduces ids VirusTotal recorded', () => {
|
||||
// Constants, not the live data files: the bot rewrites those, and a data
|
||||
// PR that moves a link must not fail a unit test (docs/04 §5 example).
|
||||
expect(urlId('https://www.7-zip.org/download.html')).toBe(
|
||||
'273d0beedb411e020dd6ce34a46330b626a4ed56df427f806c4c552ea5c287e7',
|
||||
);
|
||||
// A bare origin gets its root path.
|
||||
expect(urlId('https://brew.sh')).toBe(
|
||||
'fea617439e19357bfe0e6404897583535935265b1301c5e3c5bdc8313fa7e697',
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps the fragment, as the API does', () => {
|
||||
// Ids VirusTotal's API returned for two batch-2 links on 2026-10-23.
|
||||
expect(urlId('https://flameshot.org/#download')).toBe(
|
||||
'95707fe983a07c4a17ea04b94ce50a9397bfe77002a56fb064015cda3273487a',
|
||||
);
|
||||
expect(urlId('https://reshade.me/#download')).toBe(
|
||||
'7db7d74ab8287c611844154d1f0d915b1dd92cce3ccfbf3f09178c0797be1d36',
|
||||
);
|
||||
});
|
||||
|
||||
it('lowercases the host, adds the root path and keeps query and fragment', () => {
|
||||
expect(canonicalUrl('HTTPS://Brew.SH')).toBe('https://brew.sh/');
|
||||
expect(canonicalUrl('https://www.videolan.org/vlc/#download')).toBe(
|
||||
'https://www.videolan.org/vlc/#download',
|
||||
);
|
||||
expect(canonicalUrl('https://x.test/get?os=win')).toBe('https://x.test/get?os=win');
|
||||
expect(canonicalUrl('https://x.test/download/')).not.toBe(
|
||||
canonicalUrl('https://x.test/download'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseSlugs', () => {
|
||||
it('splits on spaces and commas, de-duplicates, and refuses non-slugs', () => {
|
||||
const log = vi.fn();
|
||||
expect(parseSlugs(' 7-zip,vlc 7-zip\nNot_A_Slug ; ', log)).toEqual(['7-zip', 'vlc']);
|
||||
expect(log).toHaveBeenCalledWith(expect.stringContaining('"Not_A_Slug"'));
|
||||
expect(log).toHaveBeenCalledWith(expect.stringContaining('";"'));
|
||||
expect(parseSlugs(undefined)).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('patchSecurity', () => {
|
||||
it('changes the three security lines of a real entry and not one byte more', () => {
|
||||
// The real file's layout, whatever its security values are today (the
|
||||
// bot changes them): the patch picks values that differ from all three.
|
||||
const current = (JSON.parse(SEVEN_ZIP) as { security: Security }).security;
|
||||
const security = {
|
||||
status: current.status === 'clean' ? 'unverified' : 'clean',
|
||||
evidence: `${GUI}${'f'.repeat(64)}`,
|
||||
checkedAt: '2000-01-01',
|
||||
};
|
||||
const before = SEVEN_ZIP.split('\n');
|
||||
const after = patchSecurity(SEVEN_ZIP, security).split('\n');
|
||||
expect(after).toHaveLength(before.length);
|
||||
const changed = before.flatMap((line, i) => (line === after[i] ? [] : [after[i]]));
|
||||
expect(changed).toEqual([
|
||||
` "status": "${security.status}",`,
|
||||
` "evidence": "${GUI}${'f'.repeat(64)}",`,
|
||||
' "checkedAt": "2000-01-01"',
|
||||
]);
|
||||
});
|
||||
|
||||
it('fills a never-scanned entry', () => {
|
||||
const text = entry(dl('a'), { status: 'unverified', evidence: null });
|
||||
const patched = patchSecurity(text, {
|
||||
status: 'unverified',
|
||||
evidence: `${GUI}abc`,
|
||||
checkedAt: TODAY,
|
||||
});
|
||||
expect(JSON.parse(patched).security).toEqual({
|
||||
status: 'unverified',
|
||||
evidence: `${GUI}abc`,
|
||||
checkedAt: TODAY,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('decide — the status rules', () => {
|
||||
it('keeps the status on a clean scan, and promotes only when asked', () => {
|
||||
expect(decide('clean', { malicious: 0 }, false)).toEqual({ status: 'clean', review: false });
|
||||
expect(decide('unverified', {}, false)).toEqual({ status: 'unverified', review: false });
|
||||
expect(decide('unverified', {}, true)).toEqual({ status: 'clean', review: false });
|
||||
});
|
||||
|
||||
it('drops clean to unverified on any detection, and never flags', () => {
|
||||
expect(decide('clean', { suspicious: 1 }, false)).toEqual({
|
||||
status: 'unverified',
|
||||
review: true,
|
||||
});
|
||||
expect(decide('clean', { malicious: 3 }, true)).toEqual({ status: 'unverified', review: true });
|
||||
expect(decide('unverified', { malicious: 1 }, true)).toEqual({
|
||||
status: 'unverified',
|
||||
review: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('select — who is due, in order', () => {
|
||||
const make = (slug: string, security: Partial<Security>, download = dl(slug)) => ({
|
||||
slug,
|
||||
app: JSON.parse(entry(download, security)),
|
||||
});
|
||||
|
||||
it('puts listed slugs first, then never-scanned, drifted and stale (oldest first)', () => {
|
||||
const entries = [
|
||||
make('fresh', { checkedAt: '2026-10-01' }),
|
||||
make('listed', { checkedAt: '2026-10-20' }),
|
||||
make('new-app', { status: 'unverified', evidence: null, checkedAt: TODAY }),
|
||||
make('drifted', { evidence: `${GUI}${urlId(dl('old-link'))}`, checkedAt: '2026-10-01' }),
|
||||
make('drift-recent', { evidence: `${GUI}${urlId(dl('old-link'))}`, checkedAt: '2026-10-20' }),
|
||||
make('stale-older', { checkedAt: '2026-06-01' }),
|
||||
make('stale', { checkedAt: '2026-07-01' }),
|
||||
make('advisory', {
|
||||
status: 'clean',
|
||||
evidence: 'https://vendor.test/advisory',
|
||||
checkedAt: '2026-10-01',
|
||||
}),
|
||||
make('flagged', { status: 'flagged', checkedAt: '2026-01-01' }),
|
||||
];
|
||||
const order = select(entries, {
|
||||
slugs: ['listed', 'missing'],
|
||||
onlyListed: false,
|
||||
maxAge: 90,
|
||||
today: TODAY,
|
||||
});
|
||||
expect(order.map((e: { slug: string }) => e.slug)).toEqual([
|
||||
'listed',
|
||||
'new-app',
|
||||
'drifted',
|
||||
'stale-older',
|
||||
'stale',
|
||||
]);
|
||||
});
|
||||
|
||||
it('in preview, scans only the listed slugs — or the never-scanned when none are listed', () => {
|
||||
const entries = [make('a', {}), make('b', { status: 'unverified', evidence: null })];
|
||||
const pick = (slugs: string[]) =>
|
||||
select(entries, { slugs, onlyListed: true, maxAge: 0, today: TODAY }).map(
|
||||
(e: { slug: string }) => e.slug,
|
||||
);
|
||||
expect(pick(['a'])).toEqual(['a']);
|
||||
expect(pick([])).toEqual(['b']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('recheck — end to end against a fake VirusTotal', () => {
|
||||
it('refreshes evidence and checkedAt on a clean scan, sending the key', async () => {
|
||||
const { appsDir } = tree({ stale: entry(dl('stale')) });
|
||||
const vt = fakeVt();
|
||||
const report = await recheck(opts(appsDir, vt.fetch));
|
||||
|
||||
expect(read(appsDir, 'stale').security).toEqual({
|
||||
status: 'clean',
|
||||
evidence: `${GUI}${urlId(dl('stale'))}`,
|
||||
checkedAt: TODAY,
|
||||
});
|
||||
expect(report).toMatchObject({ changed: 1, spent: 2, quotaHit: false, selected: 1 });
|
||||
expect(report.rows[0]).toMatchObject({
|
||||
slug: 'stale',
|
||||
kind: 'scanned',
|
||||
malicious: 0,
|
||||
mismatch: false,
|
||||
});
|
||||
expect(vt.calls.map((c) => `${c.method} ${c.path.replace(/[0-9a-f]{64}/, 'ID')}`)).toEqual([
|
||||
'POST /api/v3/urls',
|
||||
'GET /api/v3/analyses/u-ID-1761177600',
|
||||
]);
|
||||
expect(vt.calls.every((c) => c.key === 'test-key')).toBe(true);
|
||||
});
|
||||
|
||||
it('leaves entries that are not due untouched', async () => {
|
||||
const fresh = entry(dl('fresh'), { checkedAt: '2026-10-01' });
|
||||
const { appsDir } = tree({ fresh });
|
||||
const vt = fakeVt();
|
||||
const report = await recheck(opts(appsDir, vt.fetch));
|
||||
expect(report.changed).toBe(0);
|
||||
expect(vt.fetch).not.toHaveBeenCalled();
|
||||
expect(readFileSync(join(appsDir, 'fresh.json'), 'utf8')).toBe(fresh);
|
||||
});
|
||||
|
||||
it('drops clean to unverified on a detection and reports it for review', async () => {
|
||||
const { appsDir } = tree({
|
||||
hit: entry(dl('hit')),
|
||||
held: entry(dl('held'), { status: 'unverified' }),
|
||||
});
|
||||
const vt = fakeVt({ [dl('hit')]: { malicious: 1 }, [dl('held')]: { suspicious: 2 } });
|
||||
const report = await recheck(opts(appsDir, vt.fetch));
|
||||
|
||||
expect(read(appsDir, 'hit').security.status).toBe('unverified');
|
||||
expect(read(appsDir, 'held').security.status).toBe('unverified');
|
||||
expect(report.review.map((r: { slug: string }) => r.slug)).toEqual(['held', 'hit']);
|
||||
expect(report.review[1]).toMatchObject({ was: 'clean', status: 'unverified', malicious: 1 });
|
||||
});
|
||||
|
||||
it('promotes only the listed unverified entries whose scan is clean', async () => {
|
||||
const { appsDir } = tree({
|
||||
'new-a': entry(dl('new-a'), { status: 'unverified', evidence: null, checkedAt: TODAY }),
|
||||
'new-b': entry(dl('new-b'), { status: 'unverified', evidence: null, checkedAt: TODAY }),
|
||||
'new-c': entry(dl('new-c'), { status: 'unverified', evidence: null, checkedAt: TODAY }),
|
||||
});
|
||||
const vt = fakeVt({ [dl('new-b')]: { malicious: 1 } });
|
||||
await recheck(opts(appsDir, vt.fetch, { promote: ['new-a', 'new-b'] }));
|
||||
expect(read(appsDir, 'new-a').security.status).toBe('clean');
|
||||
expect(read(appsDir, 'new-b').security.status).toBe('unverified');
|
||||
expect(read(appsDir, 'new-c').security).toMatchObject({
|
||||
status: 'unverified',
|
||||
evidence: `${GUI}${urlId(dl('new-c'))}`,
|
||||
});
|
||||
});
|
||||
|
||||
it('spends at most half the budget on submissions', async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')), b: entry(dl('b')), c: entry(dl('c')) });
|
||||
const vt = fakeVt();
|
||||
const report = await recheck(opts(appsDir, vt.fetch, { budget: 4 }));
|
||||
expect(report.spent).toBe(4);
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'c')).toMatchObject({
|
||||
kind: 'skipped',
|
||||
reason: 'budget',
|
||||
});
|
||||
expect(read(appsDir, 'c').security.checkedAt).toBe(STALE);
|
||||
});
|
||||
|
||||
it('re-reads an analysis that is still queued, up to three times', async () => {
|
||||
const { appsDir } = tree({ slow: entry(dl('slow')), stuck: entry(dl('stuck')) });
|
||||
const vt = fakeVt({ [dl('slow')]: { queued: 2 }, [dl('stuck')]: { queued: 9 } });
|
||||
const report = await recheck(opts(appsDir, vt.fetch));
|
||||
expect(read(appsDir, 'slow').security.checkedAt).toBe(TODAY);
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'stuck')).toMatchObject({
|
||||
kind: 'error',
|
||||
reason: 'analysis still queued',
|
||||
});
|
||||
expect(read(appsDir, 'stuck').security.checkedAt).toBe(STALE);
|
||||
});
|
||||
|
||||
it('backs off once on 429, then treats a second 429 as the spent daily quota', async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')), b: entry(dl('b')), c: entry(dl('c')) });
|
||||
// Request 1 (submit a) is limited once and retried; request 4 (submit c)
|
||||
// and its retry are both refused — the day's quota is gone.
|
||||
const vt = fakeVt({}, { status429: [1, 4, 5] });
|
||||
const o = opts(appsDir, vt.fetch);
|
||||
const report = await recheck(o);
|
||||
|
||||
expect(o.sleep).toHaveBeenCalledWith(60_000);
|
||||
expect(report.quotaHit).toBe(true);
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'c')).toMatchObject({
|
||||
kind: 'error',
|
||||
reason: 'daily quota',
|
||||
});
|
||||
// a and b were submitted before the quota ran out, but their reads come
|
||||
// after it: nothing is guessed, nothing is written for them.
|
||||
expect(report.rows.filter((r: { kind: string }) => r.kind === 'skipped')).toHaveLength(2);
|
||||
expect(report.changed).toBe(0);
|
||||
});
|
||||
|
||||
it('stops everything on a refused API key, writing nothing', async () => {
|
||||
const text = entry(dl('a'));
|
||||
const { appsDir } = tree({ a: text });
|
||||
const fetch = vi.fn(async () => new Response('denied', { status: 401 }));
|
||||
await expect(recheck(opts(appsDir, fetch))).rejects.toBeInstanceOf(AuthError);
|
||||
expect(readFileSync(join(appsDir, 'a.json'), 'utf8')).toBe(text);
|
||||
});
|
||||
|
||||
it('records a failed URL as not checked and carries on', async () => {
|
||||
const { appsDir } = tree({
|
||||
bad: entry(dl('bad')),
|
||||
good: entry(dl('good')),
|
||||
odd: entry(dl('odd')),
|
||||
});
|
||||
const vt = fakeVt({ [dl('bad')]: { submitStatus: 400 }, [dl('odd')]: { readStatus: 500 } });
|
||||
const report = await recheck(opts(appsDir, vt.fetch));
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'bad')).toMatchObject({
|
||||
kind: 'error',
|
||||
reason: 'HTTP 400',
|
||||
});
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'odd')).toMatchObject({
|
||||
kind: 'error',
|
||||
reason: 'HTTP 500',
|
||||
});
|
||||
expect(read(appsDir, 'good').security.checkedAt).toBe(TODAY);
|
||||
expect(report.changed).toBe(1);
|
||||
});
|
||||
|
||||
it('refuses an analysis in which no engine answered', async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')) });
|
||||
const report = await recheck(opts(appsDir, fakeVt({ [dl('a')]: { empty: true } }).fetch));
|
||||
expect(report.rows[0]).toMatchObject({ kind: 'error', reason: 'no engine returned a verdict' });
|
||||
expect(report.changed).toBe(0);
|
||||
});
|
||||
|
||||
it("takes the URL id from the analysis id when `meta` is missing, and flags an id it can't reproduce", async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')), b: entry(dl('b')) });
|
||||
const log = vi.fn();
|
||||
const vt = fakeVt({ [dl('a')]: { noMeta: true }, [dl('b')]: { id: 'e'.repeat(64) } });
|
||||
const report = await recheck(opts(appsDir, vt.fetch, { log }));
|
||||
expect(read(appsDir, 'a').security.evidence).toBe(`${GUI}${urlId(dl('a'))}`);
|
||||
expect(read(appsDir, 'b').security.evidence).toBe(`${GUI}${'e'.repeat(64)}`);
|
||||
expect(report.rows.find((r: { slug: string }) => r.slug === 'b')).toMatchObject({
|
||||
mismatch: true,
|
||||
});
|
||||
expect(log).toHaveBeenCalledWith(expect.stringContaining("b: VirusTotal's URL id differs"));
|
||||
});
|
||||
|
||||
it('paces requests at the configured interval', async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')), b: entry(dl('b')) });
|
||||
let clock = 0;
|
||||
const sleep = vi.fn(async (ms: number) => {
|
||||
clock += ms;
|
||||
});
|
||||
await recheck(opts(appsDir, fakeVt().fetch, { intervalMs: 15_500, now: () => clock, sleep }));
|
||||
expect(sleep).toHaveBeenCalledTimes(3); // 4 requests, the first one unpaced
|
||||
expect(sleep.mock.calls.every(([ms]) => ms === 15_500)).toBe(true);
|
||||
});
|
||||
|
||||
it('skips files that are not catalogue entries', async () => {
|
||||
const log = vi.fn();
|
||||
const { appsDir } = tree({ broken: '{ nope', partial: '{"name": "x"}' });
|
||||
const report = await recheck(opts(appsDir, fakeVt().fetch, { log }));
|
||||
expect(report.selected).toBe(0);
|
||||
expect(log).toHaveBeenCalledWith(expect.stringContaining('unparseable broken.json'));
|
||||
expect(log).toHaveBeenCalledWith(expect.stringContaining('skipping partial.json'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('carry — accumulating in the open re-check PR', () => {
|
||||
it('adopts newer scans of the same link, so they are not re-scanned', async () => {
|
||||
const { appsDir } = tree({
|
||||
done: entry(dl('done')),
|
||||
moved: entry(dl('moved')),
|
||||
older: entry(dl('older')),
|
||||
flagged: entry(dl('flagged')),
|
||||
junk: entry(dl('junk')),
|
||||
});
|
||||
const carried = project({
|
||||
'done.json': entry(dl('done'), { status: 'unverified', checkedAt: '2026-10-22' }),
|
||||
'moved.json': entry(dl('moved-elsewhere'), { checkedAt: '2026-10-22' }),
|
||||
'older.json': entry(dl('older'), { checkedAt: '2026-05-01' }),
|
||||
'flagged.json': entry(dl('flagged'), { status: 'flagged', checkedAt: '2026-10-22' }),
|
||||
'junk.json': '{ nope',
|
||||
});
|
||||
const vt = fakeVt();
|
||||
const report = await recheck(opts(appsDir, vt.fetch, { carryDir: carried }));
|
||||
|
||||
expect(report.carried).toEqual(['done']);
|
||||
expect(read(appsDir, 'done').security).toMatchObject({
|
||||
status: 'unverified',
|
||||
checkedAt: '2026-10-22',
|
||||
});
|
||||
// Everything else was still due and got a fresh scan of ITS link.
|
||||
expect(report.rows.map((r: { slug: string }) => r.slug).sort()).toEqual([
|
||||
'flagged',
|
||||
'junk',
|
||||
'moved',
|
||||
'older',
|
||||
]);
|
||||
expect(read(appsDir, 'moved').security.evidence).toBe(`${GUI}${urlId(dl('moved'))}`);
|
||||
});
|
||||
|
||||
it('is a no-op without a carry tree', async () => {
|
||||
const { appsDir } = tree({ a: entry(dl('a')) });
|
||||
const report = await recheck(
|
||||
opts(appsDir, fakeVt().fetch, { carryDir: join(appsDir, 'none') }),
|
||||
);
|
||||
expect(report.carried).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('summary — the PR body', () => {
|
||||
it('lists every row, the review set, carried entries and a quota stop', () => {
|
||||
const text = summary(
|
||||
{
|
||||
rows: [
|
||||
{
|
||||
slug: 'a',
|
||||
kind: 'scanned',
|
||||
evidence: `${GUI}aa`,
|
||||
malicious: 0,
|
||||
suspicious: 0,
|
||||
was: 'clean',
|
||||
status: 'clean',
|
||||
mismatch: false,
|
||||
},
|
||||
{
|
||||
slug: 'b',
|
||||
kind: 'scanned',
|
||||
evidence: `${GUI}bb`,
|
||||
malicious: 2,
|
||||
suspicious: 1,
|
||||
was: 'clean',
|
||||
status: 'unverified',
|
||||
review: true,
|
||||
mismatch: true,
|
||||
},
|
||||
{ slug: 'c', kind: 'skipped', reason: 'budget' },
|
||||
],
|
||||
review: [{ slug: 'b' }],
|
||||
carried: ['d'],
|
||||
spent: 5,
|
||||
quotaHit: true,
|
||||
selected: 4,
|
||||
},
|
||||
{ today: TODAY },
|
||||
);
|
||||
expect(text).toContain('- scanned: 2 of 4 due · requests: 5 · **stopped at the daily quota**');
|
||||
expect(text).toContain('- needs review (detections): 1 — `b`');
|
||||
expect(text).toContain('- carried from the open re-check PR: 1 (d)');
|
||||
expect(text).toContain(`| \`a\` | no detections | clean | [scan](${GUI}aa) |`);
|
||||
expect(text).toContain(
|
||||
'| `b` | ⚠ 2 malicious, 1 suspicious · id ≠ local hash | clean → **unverified** |',
|
||||
);
|
||||
expect(text).toContain('| `c` | not checked (budget) | — | — |');
|
||||
expect(text).toContain('not a safety guarantee');
|
||||
});
|
||||
});
|
||||
|
||||
describe('main — the CLI wrapper', () => {
|
||||
it('writes the report, the review list and the step outputs', async () => {
|
||||
const { root, appsDir } = tree({ hit: entry(dl('hit')), ok: entry(dl('ok')) });
|
||||
vi.stubGlobal('fetch', fakeVt({ [dl('hit')]: { malicious: 1 } }).fetch);
|
||||
vi.spyOn(console, 'log').mockImplementation(() => {});
|
||||
const env = {
|
||||
VT_API_KEY: 'k',
|
||||
VT_INTERVAL_MS: '0',
|
||||
VT_SLUGS: 'ok, hit',
|
||||
VT_BUDGET: 'lots',
|
||||
GITHUB_OUTPUT: join(root, 'out.txt'),
|
||||
VT_SUMMARY: join(root, 'summary.md'),
|
||||
VT_REVIEW_JSON: join(root, 'review.json'),
|
||||
};
|
||||
expect(await main(env, root)).toBe(0);
|
||||
expect(readFileSync(env.GITHUB_OUTPUT, 'utf8')).toBe('changed=2\nreview=hit\n');
|
||||
expect(readFileSync(env.VT_SUMMARY, 'utf8')).toContain('needs review (detections): 1');
|
||||
expect(JSON.parse(readFileSync(env.VT_REVIEW_JSON, 'utf8'))[0]).toMatchObject({
|
||||
slug: 'hit',
|
||||
malicious: 1,
|
||||
evidence: `${GUI}${urlId(dl('hit'))}`,
|
||||
});
|
||||
expect(read(appsDir, 'ok').security.checkedAt).toBe(new Date().toISOString().slice(0, 10));
|
||||
});
|
||||
|
||||
it('fails the step on a refused key, reporting no changes', async () => {
|
||||
const { root } = tree({ a: entry(dl('a')) });
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn(async () => new Response('', { status: 403 })),
|
||||
);
|
||||
vi.spyOn(console, 'error').mockImplementation(() => {});
|
||||
const env = { VT_API_KEY: 'k', VT_INTERVAL_MS: '0', GITHUB_OUTPUT: join(root, 'out.txt') };
|
||||
expect(await main(env, root)).toBe(1);
|
||||
expect(readFileSync(env.GITHUB_OUTPUT, 'utf8')).toBe('changed=0\nreview=\n');
|
||||
});
|
||||
|
||||
it('runs as a script: without a key it says so and changes nothing', () => {
|
||||
const text = entry(dl('a'));
|
||||
const { root, appsDir } = tree({ a: text });
|
||||
const r = run('vt-recheck.mjs', root, {
|
||||
env: { NODE_V8_COVERAGE: '', VT_API_KEY: '', GITHUB_OUTPUT: join(root, 'out.txt') },
|
||||
});
|
||||
expect(r.code).toBe(0);
|
||||
expect(r.out).toContain('VT_API_KEY is not set');
|
||||
expect(readFileSync(join(root, 'out.txt'), 'utf8')).toBe('changed=0\nreview=\n');
|
||||
expect(readFileSync(join(appsDir, 'a.json'), 'utf8')).toBe(text);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
# SonarQube Cloud, CI-based analysis (docs/12 §2). Read by the scanner in
|
||||
# ci.yml's `sonar` job; Automatic Analysis is off for this project — it and a
|
||||
# CI scan cannot both run, and only a CI scan can import coverage.
|
||||
sonar.organization=poli0981
|
||||
sonar.projectKey=poli0981_softharbor
|
||||
sonar.projectName=SoftHarbor
|
||||
|
||||
# Sources stay rooted at the repo so workflow files under .github/ keep being
|
||||
# analysed (the githubactions rules found unpinned actions there). Tests are
|
||||
# split out so test files are judged by test rules — scripts/fixture.ts is the
|
||||
# scripts' test kit, not shipped code — and the curated dataset is excluded:
|
||||
# it is CC BY-SA content validated by Zod + validate:data, not code.
|
||||
sonar.sources=.
|
||||
sonar.tests=.
|
||||
sonar.exclusions=src/data/**,data/**,docs/**,dist/**,coverage/**,node_modules/**,**/*.test.ts,**/*.test.mjs,e2e/**,scripts/fixture.ts
|
||||
sonar.test.inclusions=**/*.test.ts,**/*.test.mjs,e2e/**,scripts/fixture.ts
|
||||
sonar.cpd.exclusions=src/data/**,src/i18n/**
|
||||
|
||||
# Written by `pnpm coverage` (vitest.config.ts). Sonar indexes no .svelte or
|
||||
# .astro file, so the islands' lcov entries are reported as unresolved and
|
||||
# skipped; every analysed .ts/.js/.mjs file is measured. The only exclusions
|
||||
# are the root toolchain configs — read by the tools themselves, not
|
||||
# unit-testable logic.
|
||||
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||
sonar.coverage.exclusions=*.config.ts,*.config.js,*.config.mjs
|
||||
@@ -28,8 +28,9 @@ const abs = (path: string) => new URL(path, site).href;
|
||||
const nodes: Record<string, unknown>[] = [];
|
||||
|
||||
if (website) {
|
||||
// One WebSite node, on / only. No SearchAction in v1: search is client-side
|
||||
// with no ?q= deep link to point at (docs/16 §7, docs/15 §2).
|
||||
// One WebSite node, on / only. No SearchAction even though /apps?q= now
|
||||
// deep-links (v1.1): Google retired the sitelinks search box in 2024, so
|
||||
// the markup would buy nothing (docs/16 §7).
|
||||
nodes.push({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
|
||||
@@ -51,8 +51,8 @@ const rows = [
|
||||
{
|
||||
area: { en: 'Security status', vi: 'Trạng thái bảo mật' },
|
||||
how: {
|
||||
en: 'Not AI-decided. Each entry is checked by the maintainer against the published vetting checklist, and the scan behind every status is linked from the app page so you can read it yourself. Where a link has changed since its scan, the linked scan is of the earlier link until the next re-check.',
|
||||
vi: 'Không do AI quyết định. Mỗi mục được người bảo trì kiểm tra theo quy trình đã công bố, và kết quả quét đứng sau mỗi trạng thái đều có liên kết ngay trên trang ứng dụng để bạn tự đọc. Nếu một liên kết đã đổi sau lần quét, kết quả được liên kết là của liên kết cũ cho tới lần kiểm tra lại kế tiếp.',
|
||||
en: 'Not AI-decided. An entry is marked "no known warnings" only after the maintainer has checked it against the published vetting checklist. From then on, a scheduled job re-scans every entry’s download page on VirusTotal at least every 90 days and moves the date forward. That job is a fixed rule, not a model: any warning sends the entry back to "unverified" and opens an issue for the maintainer, and only the maintainer ever marks an entry clean or removes one. The scan behind every status is linked from the app page so you can read it yourself. Where a link has changed since its scan, the linked scan is of the earlier link until the next re-check.',
|
||||
vi: 'Không do AI quyết định. Một mục chỉ được ghi "Không có cảnh báo đã biết" sau khi người bảo trì đã kiểm tra nó theo quy trình đã công bố. Từ đó trở đi, một tác vụ định kỳ quét lại trang tải về của mọi mục trên VirusTotal ít nhất 90 ngày một lần và cập nhật ngày kiểm tra. Tác vụ đó là một quy tắc cố định, không phải mô hình AI: chỉ cần một cảnh báo là mục bị đưa về "Chưa kiểm chứng" và một issue được mở cho người bảo trì, và chỉ người bảo trì mới đánh dấu một mục là an toàn hoặc gỡ nó khỏi danh sách. Kết quả quét đứng sau mỗi trạng thái đều có liên kết ngay trên trang ứng dụng để bạn tự đọc. Nếu một liên kết đã đổi sau lần quét, kết quả được liên kết là của liên kết cũ cho tới lần kiểm tra lại kế tiếp.',
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -68,8 +68,8 @@ const rows = [
|
||||
|
||||
<p>
|
||||
{en
|
||||
? 'Claude models developed by Anthropic, used through Claude Code — Anthropic’s command-line coding tool: Claude Opus 5 (model identifier claude-opus-5) for the site and catalogue through v1.0, and Claude Opus 5.5 (claude-opus-5-5) for the v1.1 work of October 2026. Earlier work on the project used Claude models through the same tool. No other AI system contributed to this site.'
|
||||
: 'Các mô hình Claude do Anthropic phát triển, sử dụng qua Claude Code — công cụ lập trình dòng lệnh của Anthropic: Claude Opus 5 (mã định danh mô hình claude-opus-5) cho trang web và danh mục đến hết v1.0, và Claude Opus 5.5 (claude-opus-5-5) cho phần việc v1.1 vào tháng 10/2026. Các giai đoạn trước của dự án cũng dùng mô hình Claude qua chính công cụ này. Không có hệ thống AI nào khác tham gia vào trang web này.'}
|
||||
? 'Claude models developed by Anthropic, used through Claude Code — Anthropic’s command-line coding tool: Claude Opus 5 (model identifier claude-opus-5) for the site and catalogue through v1.0, and Claude Opus 5.5 (claude-opus-5-5) for the v1.1 and v1.2 work of October 2026. Earlier work on the project used Claude models through the same tool. No other AI system contributed to this site.'
|
||||
: 'Các mô hình Claude do Anthropic phát triển, sử dụng qua Claude Code — công cụ lập trình dòng lệnh của Anthropic: Claude Opus 5 (mã định danh mô hình claude-opus-5) cho trang web và danh mục đến hết v1.0, và Claude Opus 5.5 (claude-opus-5-5) cho phần việc v1.1 và v1.2 vào tháng 10/2026. Các giai đoạn trước của dự án cũng dùng mô hình Claude qua chính công cụ này. Không có hệ thống AI nào khác tham gia vào trang web này.'}
|
||||
</p>
|
||||
|
||||
<h2>{en ? 'Where it was used' : 'Đã dùng ở đâu'}</h2>
|
||||
|
||||
@@ -25,12 +25,14 @@ const SAMPLE = 3;
|
||||
|
||||
<Base
|
||||
title={`${t(locale, 'categories.title')} — ${t(locale, 'site.name')}`}
|
||||
description={t(locale, 'meta.categories')}
|
||||
description={t(locale, 'meta.categories', { n: categories.length })}
|
||||
{locale}
|
||||
>
|
||||
<p class="sh-eyebrow">{t(locale, 'welcome.manifest')}</p>
|
||||
<h1 class="mt-2 text-[length:var(--text-h1)] font-semibold">{t(locale, 'categories.title')}</h1>
|
||||
<p class="text-sh-muted mt-2 max-w-2xl">{t(locale, 'categories.intro')}</p>
|
||||
<p class="text-sh-muted mt-2 max-w-2xl">
|
||||
{t(locale, 'categories.intro', { n: categories.length })}
|
||||
</p>
|
||||
|
||||
<ul class="sh-stagger mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{categories.map((c) => {
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 (SkullMute)
|
||||
//
|
||||
// Validation layer L1 (docs/03 §2): the Zod rules in src/content.config.ts.
|
||||
// Astro's content runtime is stubbed — `defineCollection` hands the config
|
||||
// back, `reference()` becomes a plain id — so what runs here is exactly our
|
||||
// schema; resolving references against categories.json stays the build's job.
|
||||
|
||||
import { z } from 'astro/zod';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
vi.mock('astro:content', () => ({
|
||||
defineCollection: (config: unknown) => config,
|
||||
reference: () => z.string(),
|
||||
}));
|
||||
vi.mock('astro/loaders', () => ({
|
||||
glob: (options: unknown) => ({ kind: 'glob', options }),
|
||||
file: (path: string) => ({ kind: 'file', path }),
|
||||
}));
|
||||
|
||||
const { collections } = await import('./content.config');
|
||||
|
||||
interface Schema {
|
||||
safeParse(input: unknown): { success: boolean; error?: { issues: Array<{ path: unknown[] }> } };
|
||||
}
|
||||
const apps = collections.apps as unknown as { schema: Schema; loader: unknown };
|
||||
const categories = collections.categories as unknown as { schema: Schema; loader: unknown };
|
||||
|
||||
const TODAY = new Date().toISOString().slice(0, 10);
|
||||
|
||||
function app(overrides: Record<string, unknown> = {}) {
|
||||
return {
|
||||
name: '7-Zip',
|
||||
developer: 'Igor Pavlov',
|
||||
logo: 'simple-icons:7zip',
|
||||
summary: {
|
||||
en: 'File archiver with a high compression ratio.',
|
||||
vi: 'Trình nén tệp với tỷ lệ nén cao.',
|
||||
},
|
||||
categories: ['file-management'],
|
||||
tags: ['archiver'],
|
||||
platforms: ['windows'],
|
||||
pricing: 'free',
|
||||
license: 'LGPL-2.1-or-later',
|
||||
links: {
|
||||
homepage: 'https://www.7-zip.org',
|
||||
repo: null,
|
||||
download: 'https://www.7-zip.org/download.html',
|
||||
},
|
||||
security: {
|
||||
status: 'clean',
|
||||
evidence: 'https://www.virustotal.com/gui/url/abc',
|
||||
checkedAt: '2026-07-30',
|
||||
},
|
||||
addedAt: '2026-07-28',
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
/** The distinct paths of every issue, joined, e.g. ["security.evidence"]. */
|
||||
function issues(input: unknown): string[] {
|
||||
const r = apps.schema.safeParse(input);
|
||||
return r.success ? [] : [...new Set((r.error?.issues ?? []).map((i) => i.path.join('.')))];
|
||||
}
|
||||
|
||||
describe('collection wiring', () => {
|
||||
it('loads apps from one JSON file per slug and categories from the registry', () => {
|
||||
expect(apps.loader).toEqual({
|
||||
kind: 'glob',
|
||||
options: { pattern: '*.json', base: './src/data/apps' },
|
||||
});
|
||||
expect(categories.loader).toEqual({ kind: 'file', path: './src/data/categories.json' });
|
||||
});
|
||||
|
||||
it('accepts a registry row and rejects a bad id', () => {
|
||||
const row = {
|
||||
id: 'ai-local',
|
||||
label: { en: 'Local AI', vi: 'AI cục bộ' },
|
||||
icon: 'bot',
|
||||
order: 1,
|
||||
};
|
||||
expect(categories.schema.safeParse(row).success).toBe(true);
|
||||
expect(categories.schema.safeParse({ ...row, id: 'AI Local' }).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('apps schema (L1)', () => {
|
||||
it('accepts a complete entry', () => {
|
||||
expect(issues(app())).toEqual([]);
|
||||
});
|
||||
|
||||
it('rejects unknown keys, so the export contract cannot silently grow', () => {
|
||||
expect(issues(app({ rating: 5 }))).toEqual(['']);
|
||||
});
|
||||
|
||||
it('accepts only the three logo forms', () => {
|
||||
for (const logo of ['simple-icons:7zip', 'local:seven-zip.svg', 'monogram']) {
|
||||
expect(issues(app({ logo }))).toEqual([]);
|
||||
}
|
||||
for (const logo of ['simple-icons:7-Zip', 'local:logo.png', 'https://x.test/a.svg']) {
|
||||
expect(issues(app({ logo }))).toEqual(['logo']);
|
||||
}
|
||||
});
|
||||
|
||||
it('bounds summaries, categories, tags and platforms', () => {
|
||||
expect(
|
||||
issues(app({ summary: { en: 'too short', vi: 'Trình nén tệp với tỷ lệ nén cao.' } })),
|
||||
).toEqual(['summary.en']);
|
||||
expect(issues(app({ categories: [] }))).toEqual(['categories']);
|
||||
expect(issues(app({ categories: ['a', 'b', 'c', 'd'] }))).toEqual(['categories']);
|
||||
expect(issues(app({ tags: ['Not Kebab'] }))).toEqual(['tags.0']);
|
||||
expect(issues(app({ tags: Array.from({ length: 9 }, (_, i) => `t${i}`) }))).toEqual(['tags']);
|
||||
expect(issues(app({ platforms: [] }))).toEqual(['platforms']);
|
||||
expect(issues(app({ platforms: ['android'] }))).toEqual(['platforms.0']);
|
||||
});
|
||||
|
||||
it('defaults tags to an empty list', () => {
|
||||
const entry: Record<string, unknown> = app();
|
||||
Reflect.deleteProperty(entry, 'tags');
|
||||
const r = apps.schema.safeParse(entry) as { success: boolean; data?: { tags: string[] } };
|
||||
expect(r.success).toBe(true);
|
||||
expect(r.data?.tags).toEqual([]);
|
||||
});
|
||||
|
||||
it('allows only the three pricing buckets (hard rule 3)', () => {
|
||||
expect(issues(app({ pricing: 'onetime' }))).toEqual([]);
|
||||
expect(issues(app({ pricing: 'subscription' }))).toEqual(['pricing']);
|
||||
});
|
||||
|
||||
it('wants https links, a nullable repo, and no http anywhere', () => {
|
||||
const links = app().links;
|
||||
expect(issues(app({ links: { ...links, repo: 'https://github.com/ip7z/7zip' } }))).toEqual([]);
|
||||
expect(issues(app({ links: { ...links, homepage: 'http://www.7-zip.org' } }))).toEqual([
|
||||
'links.homepage',
|
||||
]);
|
||||
expect(issues(app({ links: { ...links, download: 'not a url' } }))).toEqual(['links.download']);
|
||||
});
|
||||
|
||||
it('requires evidence for a status that claims something (hard rule 4)', () => {
|
||||
const security = app().security;
|
||||
for (const status of ['clean', 'flagged']) {
|
||||
expect(issues(app({ security: { ...security, status, evidence: null } }))).toEqual([
|
||||
'security.evidence',
|
||||
]);
|
||||
}
|
||||
expect(
|
||||
issues(app({ security: { ...security, status: 'unverified', evidence: null } })),
|
||||
).toEqual([]);
|
||||
expect(issues(app({ security: { ...security, status: 'safe' } }))).toEqual(['security.status']);
|
||||
});
|
||||
|
||||
it('takes only real, past calendar dates', () => {
|
||||
const security = app().security;
|
||||
expect(issues(app({ addedAt: '2026-02-31' }))).toEqual(['addedAt']);
|
||||
expect(issues(app({ addedAt: '28/07/2026' }))).toEqual(['addedAt']);
|
||||
expect(issues(app({ addedAt: '2999-01-01' }))).toEqual(['addedAt']);
|
||||
expect(issues(app({ security: { ...security, checkedAt: TODAY } }))).toEqual([]);
|
||||
});
|
||||
|
||||
it('keeps updatedAt on or after addedAt', () => {
|
||||
expect(issues(app({ updatedAt: '2026-07-28' }))).toEqual([]);
|
||||
expect(issues(app({ updatedAt: '2026-07-01' }))).toEqual(['updatedAt']);
|
||||
});
|
||||
});
|
||||
+13
-4
@@ -8,8 +8,10 @@
|
||||
// fails the build (hard rule 2). Cross-file rules Zod cannot see live in L2,
|
||||
// scripts/validate-data.mjs (docs/03 §2).
|
||||
|
||||
import { defineCollection, reference, z } from 'astro:content';
|
||||
import { defineCollection, reference } from 'astro:content';
|
||||
import { glob, file } from 'astro/loaders';
|
||||
// `z` from 'astro:content' is deprecated and goes away in Astro 8.
|
||||
import { z } from 'astro/zod';
|
||||
|
||||
/** Today in UTC, at build time: data dated after the build is a typo. */
|
||||
const TODAY = new Date().toISOString().slice(0, 10);
|
||||
@@ -17,13 +19,20 @@ const TODAY = new Date().toISOString().slice(0, 10);
|
||||
/**
|
||||
* A real calendar date in YYYY-MM-DD, not in the future. The regex alone let
|
||||
* `2026-02-31` through; round-tripping through Date catches impossible days.
|
||||
* Zod runs this refinement even after the regex failed, and an unparseable
|
||||
* string makes `toISOString()` THROW — which crashed the build with a bare
|
||||
* RangeError instead of naming the field — so the NaN case is answered first.
|
||||
*/
|
||||
const DATE = z
|
||||
.string()
|
||||
.regex(/^\d{4}-\d{2}-\d{2}$/, 'YYYY-MM-DD')
|
||||
.refine((d) => new Date(`${d}T00:00:00Z`).toISOString().slice(0, 10) === d, {
|
||||
message: 'not a real calendar date',
|
||||
})
|
||||
.refine(
|
||||
(d) => {
|
||||
const t = Date.parse(`${d}T00:00:00Z`);
|
||||
return !Number.isNaN(t) && new Date(t).toISOString().slice(0, 10) === d;
|
||||
},
|
||||
{ message: 'not a real calendar date' },
|
||||
)
|
||||
.refine((d) => d <= TODAY, { message: 'date is in the future' });
|
||||
const HTTPS = z.url().refine((u) => u.startsWith('https://'), { message: 'https:// only' });
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
"download": "https://www.7-zip.org/download.html"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/273d0beedb411e020dd6ce34a46330b626a4ed56df427f806c4c552ea5c287e7",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/66ec73178edf83ac3561f6754f04cb1a3e2d4067740fa6458b21edfec1fe1379",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/bc01e3692d3c6f3f13c9d680dab0cc114507257ab7037cdc64901f822cab81ce",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/cf2f2f966e3ecac21fe37bbec5ce773e243b9257f3d2c02f08ccc82bfc7a52c0",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/c39762ceea241e6b641ff617dc7aee2970ab2dcf0e95726119c87766ebbf9a2d",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/e8ac3c3060a6fe5a0a32c2dec6ceafcd718755838f676c80bd22350f1e0eea36",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/f52da1e204a4b23dee3685b323e3c55d8f6c13555400f15f1d6cf1483c40813d",
|
||||
"checkedAt": "2026-07-30"
|
||||
"evidence": "https://www.virustotal.com/gui/url/d98b0b0235c9b29b98001eeb111ecbae8885bf011f8e356816eb159852598ed9",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "AltTab",
|
||||
"developer": "lwouis",
|
||||
"logo": "monogram",
|
||||
"summary": {
|
||||
"en": "Windows-style Alt-Tab for macOS that switches between individual windows with live thumbnails; search and extra styles need Pro.",
|
||||
"vi": "Alt-Tab kiểu Windows cho macOS, chuyển giữa từng cửa sổ với ảnh thu nhỏ trực tiếp; tìm kiếm và kiểu hiển thị thêm cần bản Pro."
|
||||
},
|
||||
"categories": ["system", "productivity"],
|
||||
"tags": [
|
||||
"window-switcher",
|
||||
"alt-tab",
|
||||
"window-management",
|
||||
"keyboard-shortcuts",
|
||||
"thumbnails",
|
||||
"macos-native",
|
||||
"signed-releases"
|
||||
],
|
||||
"platforms": ["macos"],
|
||||
"pricing": "free-onetime",
|
||||
"license": "GPL-3.0-only",
|
||||
"links": {
|
||||
"homepage": "https://alt-tab.app",
|
||||
"repo": "https://github.com/lwouis/alt-tab-macos",
|
||||
"download": "https://github.com/lwouis/alt-tab-macos/releases"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/50e65202604e4421240fbdd308e6484a88bfb187004a6b4cece27794172dd5d3",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-10-23"
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"download": "https://developer.android.com/studio"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/c19baa232f69e69a69d324ece0a21a3afe17245faad082eef9b959fa14092afb",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/c6db457a817f75f282787953b476e1f0d7f3d6e134191996e8e155c8a14625c8",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/620bae05d58f680547377f88dc9f9313d2a462af3410270025257c4151b6ed1d",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/9dd9b203e2dc4a0809a3a7754df010ceb698082e37d39b6d239db9659211973e",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/a4b78ab9b0242f031669d08601ffda2fca95c9c18d7ac01e2506e7a66b79a939",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/974c9b4b405696a503b0643760f29a8b29106418bcceb5c38d260d548cd2b46e",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/c4f781cf3889cd389fffb7a931d135abad474f9be17725d2945e198d741baaf6",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/d2c5670ffca8f7043b3346757dc388534244efec995d58894440a85c3fb837a7",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "AutoHotkey",
|
||||
"developer": "AutoHotkey Foundation LLC",
|
||||
"logo": "simple-icons:autohotkey",
|
||||
"summary": {
|
||||
"en": "Scripting language for Windows automation: short scripts bind hotkeys, remap keys, expand abbreviations and drive other windows.",
|
||||
"vi": "Ngôn ngữ kịch bản tự động hoá Windows: vài dòng script để gán phím tắt, đổi phím, mở rộng từ viết tắt và điều khiển cửa sổ khác."
|
||||
},
|
||||
"categories": ["productivity", "developer-tools", "utilities"],
|
||||
"tags": ["automation", "scripting", "macros", "key-mapping", "keyboard-shortcuts"],
|
||||
"platforms": ["windows"],
|
||||
"pricing": "free",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"links": {
|
||||
"homepage": "https://www.autohotkey.com",
|
||||
"repo": "https://github.com/AutoHotkey/AutoHotkey",
|
||||
"download": "https://www.autohotkey.com/download/"
|
||||
},
|
||||
"security": {
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/4d04818ce36865ef6a9f6479e05bc81d7c745045db094b4d3db1f84651c549e3",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-10-23"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/01ec7e7dd88f4831f53c687f23072cdf1f7d216eb5a52784b0418492f553e407",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Azahar",
|
||||
"developer": "Azahar Emulator Project",
|
||||
"logo": "monogram",
|
||||
"summary": {
|
||||
"en": "Nintendo 3DS emulator that carries on the Citra codebase, with higher internal resolutions, save states and modern controller support.",
|
||||
"vi": "Trình giả lập Nintendo 3DS tiếp nối mã nguồn Citra, hỗ trợ độ phân giải nội bộ cao hơn, lưu trạng thái và tay cầm hiện đại."
|
||||
},
|
||||
"categories": ["gaming"],
|
||||
"tags": ["nintendo-3ds", "upscaling", "save-states", "citra-fork"],
|
||||
"platforms": ["windows", "macos", "linux"],
|
||||
"pricing": "free",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"links": {
|
||||
"homepage": "https://azahar-emu.org",
|
||||
"repo": "https://github.com/azahar-emu/azahar",
|
||||
"download": "https://azahar-emu.org/pages/download/"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/caf89bb9b977df2472b7102cfaca664dc65bf957aa798ecb17065bb55ecd3e34",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-10-23"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/ed82f0b2e9786baf3d815edf6c95efe9adc6c2616628cc8f04099acab72c9145",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/27c34905dd276033ae0d70e61740ac45d534ac58735defbe73b02edf0f0d8910",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/689583aca9dc030696aba0ff22e50ddb04355000f478b9d5acdd484f2093fd60",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/b9a84f215ad793f52e2e863e6e0200704271feac9b0f32bcc79a87f27a5529e8",
|
||||
"checkedAt": "2026-07-30"
|
||||
"evidence": "https://www.virustotal.com/gui/url/1f113d103aed5cdde3972b6bdce48a90296041159a1f3b134fc26639f03569b6",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/7a53258ce835dd5464591e90ba0c61d41ed39d407de55e996d43b92e3e8f8110",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/4553fde1aec58dd46467b305a544e01bb7e26acd72a6e8e3e04500085a06fcde",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/78f86bc3a8c4f304fe74919979072c98f28607051c22a7bffb2cffa8c18fa616",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
"en": "3D suite covering modelling, sculpting, animation, simulation and rendering in one application.",
|
||||
"vi": "Bộ công cụ 3D gồm dựng hình, điêu khắc, hoạt hình, mô phỏng và kết xuất trong cùng một ứng dụng."
|
||||
},
|
||||
"categories": ["graphics", "media"],
|
||||
"categories": ["graphics", "media", "cad-3d"],
|
||||
"tags": ["3d", "modelling", "animation", "rendering"],
|
||||
"platforms": ["windows", "macos", "linux"],
|
||||
"pricing": "free",
|
||||
@@ -19,7 +19,8 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/350ceecfe030c9469671bff03194cdf53d3103b35a4dc5f879628a891aa8c2f0",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
"addedAt": "2026-07-28",
|
||||
"updatedAt": "2026-10-23"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/1e645e7b8d97eebdbdb863278add37dcae013f3301581877ab7bbc37352417ca",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/50868231ac2c552c4bab241ffab0290c0124adb05b325fa1f7c5351b8a1b1708",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/6f8b24a7f8f02f7939fd74b024f4649bb1e750cac9f80b6b402b88498ce8c1fa",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/adae9b1a7df45ddf18d40a242165875b1372b9eb9e384f85a466eceeaecb73b5",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Bulk Crap Uninstaller",
|
||||
"developer": "Marcin Szeniak",
|
||||
"logo": "monogram",
|
||||
"summary": {
|
||||
"en": "Uninstaller that removes many programs in one queued run, then looks for leftover files and registry keys; Store apps and Steam games too.",
|
||||
"vi": "Trình gỡ cài đặt gỡ nhiều chương trình trong một lượt xếp hàng, rồi tìm tệp và khoá registry còn sót; xử lý cả ứng dụng Store và game Steam."
|
||||
},
|
||||
"categories": ["system", "utilities"],
|
||||
"tags": ["uninstaller", "leftovers", "batch-processing", "cleanup", "portable"],
|
||||
"platforms": ["windows"],
|
||||
"pricing": "free",
|
||||
"license": "Apache-2.0",
|
||||
"links": {
|
||||
"homepage": "https://www.bcuninstaller.com",
|
||||
"repo": "https://github.com/BCUninstaller/Bulk-Crap-Uninstaller",
|
||||
"download": "https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/releases"
|
||||
},
|
||||
"security": {
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/4021e24fda8949410ef64b32752996e075b78f60f3188244efb415df5e3bf3e4",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-10-23"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/91be0f575bd0ba3a9d7eb80b18036b410adae59e890447a3a868121d0bf6ec6b",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/832c84732c515a4cbb07212e795e4443f5ab283c18520e6e23d9908ea7b5e918",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/cf7c891ec8cea354ef87f558daf16a1baa9ca61479cda18cae7593ea60dedece",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/1edf829f6532d73daeea02edaae8abcfd55aa25d1b998ab598f1f26c64c6ecf1",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/afd577889efad8d69f20f5521d1cf365335391e25307ee412048be13e6c7b042",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/dd1a69ae7548b62bd8b27ef551986a327d1c889d8867c86aaa902242ecb1e477",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/90031cb764026785fccfd5d2f98d942f8238392c6bceafbf0f6ffdf76e93516e",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/356e3659e5460601e1edfb44331f6c3df49a9bf345fd004c692ddf6843873a01",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/91fbde4df664dbd64c1d434811fc65b850a8908a4c8f58217565c866aa63763e",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/6c99ce42f436b0d8b09be05c3fb7a114c50d47b4b06c576ef0ed8ff81e92f203",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/6c99ce42f436b0d8b09be05c3fb7a114c50d47b4b06c576ef0ed8ff81e92f203",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/21c4743258ac5b19db23daa29cf453e85c45dd3781eccab8294578093e1b9f83",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/5521c46e54043e2ba7558fe014f698b85fc8613d3c3458b6436016a6ea12b82a",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/e7950e2a9fb58c2c7c3d8698586f6c58b13c7a397e7f88a462c5bf45a2c4dbe0",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/533e1e93038663a233b9fa3b5a8b17d74c31d09aad9b16e5b99feb369de90a33",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/0ba1074a19f29fdef290241aa511b87e23e38638196f5d36678dc4e9b2ee3307",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/21654a97f861e37fdf6c0e5bd7462186f25eba1f599688e54048dc7202c5907a",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"download": "https://dbeaver.io/download/"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/4501ec70bd4de7a1496fa573fe3e2dd94d9caa526c3fba937085acdb2595f362",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/eab6dcec250204d4085638f4611366311b3e5b286a6ac14278b8c6841cffe3dc",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"download": "https://devtoys.app/download"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"status": "unverified",
|
||||
"evidence": "https://www.virustotal.com/gui/url/b583d39856e8ccf6d06e97486cba5c4cf40cc04b18e5e48bdf2858db13058fd6",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/52a1ce5a6f5337439fd0989d371b9f2d2889ed68dd51923ef31761b138dd865c",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/3d935b1b200525731c67e81f7c191cbd91f72b8926cba64dd7d86088b6016d17",
|
||||
"checkedAt": "2026-07-30"
|
||||
"evidence": "https://www.virustotal.com/gui/url/37801f3af001df3efb1a5d8512135d953195161ff5531a7b79710f33417c87d3",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/903f001bc99f5017af8c8fd2826d9e84a0b19d9b1aa420bc5ddb6257c27bb000",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Ditto",
|
||||
"developer": "Scott Brogden",
|
||||
"logo": "monogram",
|
||||
"summary": {
|
||||
"en": "Clipboard manager that keeps everything you copy, images and rich text included, in a searchable local history behind a hotkey.",
|
||||
"vi": "Trình quản lý clipboard lưu mọi thứ bạn sao chép, kể cả ảnh và văn bản định dạng, thành lịch sử cục bộ tìm được, gọi bằng phím tắt."
|
||||
},
|
||||
"categories": ["productivity", "utilities"],
|
||||
"tags": ["clipboard", "search", "portable", "no-telemetry", "signed-releases"],
|
||||
"platforms": ["windows"],
|
||||
"pricing": "free",
|
||||
"license": "GPL-3.0-only",
|
||||
"links": {
|
||||
"homepage": "https://sabrogden.github.io/Ditto/",
|
||||
"repo": "https://github.com/sabrogden/Ditto",
|
||||
"download": "https://github.com/sabrogden/Ditto/releases"
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/4459d100223abbec310450d221ee7f9f815536948d808bd752d59910c855d252",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-10-23"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/49293940f156c980b1f8bee9de449f6f36ded7a7ae2c76f8ade447f610ff1016",
|
||||
"checkedAt": "2026-07-30"
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"security": {
|
||||
"status": "clean",
|
||||
"evidence": "https://www.virustotal.com/gui/url/c975fb730474f9e956e4758765d50d9b8ca41c1ec5f2e2c1a118dc219f9a17f7",
|
||||
"checkedAt": "2026-07-30"
|
||||
"evidence": "https://www.virustotal.com/gui/url/91b5f0da9cbeefc87e2effc212cf02cfea08fe4162f2e1da9a9ebc750f4a37bf",
|
||||
"checkedAt": "2026-10-23"
|
||||
},
|
||||
"addedAt": "2026-07-28"
|
||||
}
|
||||
Loaded 100 of 294 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user