Commit Graph
212 Commits
Author SHA1 Message Date
weichen 71fb2aff89 Close 1 merged task card and archive it
ci / test (pull_request) Failing after 1m37s
Why: feature/svc-deploy-source-registry merged via PR #55 (merge 8523415);
its card must be marked done and archived per the no-pending-cards rule.
Evidence: git log --merges origin/main shows 8523415 merging the branch;
card backfilled with PR link and moved to .task/archive/.
Impact: .task bookkeeping only.
Refs: task.sh close
2026-09-30 13:22:23 +00:00
weichen 85234157a2 Merge pull request 'Add commit-picked deploys and a service registry to svc.sh' (#55) from feature/svc-deploy-source-registry into main
ci / test (push) Failing after 30s
2026-09-30 13:21:43 +00:00
weichen 3a91fda7c3 Link the svc registry task card to PR #55
ci / test (pull_request) Failing after 31s
Why: 任务卡与 PR 描述为同一份文档,主记录链接须回填。
Evidence: PR #55 已建立(head=feature/svc-deploy-source-registry)。
Impact: 仅任务卡元数据。
2026-09-30 13:21:35 +00:00
weichen b4f9e93d56 Record the sync checkpoint
ci / test (pull_request) Failing after 1m31s
2026-09-30 13:20:32 +00:00
weichen 8ba1b0e715 Add commit-picked deploys and a service registry to svc.sh
Why:
svc.sh only knew two hardcoded environments (dev/prod) and always built
the current workspace, so there was no way to deploy a specific Dev- repo
commit or a Releases artifact, and no record of what was actually started.

Evidence:
- scripts/svc.sh commits dev|release lists deployable commits (release
  entries annotated with version + devCommit; both mark HEAD and the
  environments already running them).
- deploy --from local|dev@<sha>|release@<version|sha> materializes the
  chosen source: dev commits build in an isolated worktree
  (runtime/.worktrees/<sha>, submodule pins verified to land exactly),
  release artifacts are sha256-verified against versions/<v>/manifest.json
  (a forged manifest is refused); --pick offers an interactive numbered
  choice and --dry-run prints the plan.
- Environment names are generalized (^[a-z][a-z0-9-]{0,15}$, derived port
  8800-9099 on collision-free scan); each env is self-contained under
  runtime/<env>/{bin,plugins,data} with svc.env (current state) and
  history.jsonl (append-only deploy/start/stop events). status scans all
  registered envs and history [env] [N] merges the event stream.
- Old artifacts that predate --dsn/--auth have those flags auto-omitted
  (probed via serve usage); legacy svc.env files still render in status.
- Verified end to end in the task worktree: stub-binary lifecycle, a real
  release@0.1.0 deploy (HTTP 200, source shown in status, commits marked),
  failure paths (sha mismatch, immediate exit, non-TTY --pick).

Impact:
scripts/svc.sh users gain multi-version side-by-side environments and
rollback by redeploying an older source; existing dev/prod defaults and
safety constraints (own-pidfile-only stop, port-occupancy check) are
unchanged. Environments deployed by the previous script need one fresh
deploy before start/restart works again. Makefile gains svc-commits and
svc-history targets.

Refs: .task/feature-svc-deploy-source-registry.md(任务卡=PR 描述)
2026-09-30 13:20:32 +00:00
weichen ab7f18d5d4 Record the task card for feature-svc-deploy-source-registry 2026-09-30 13:03:31 +00:00
weichen 8c4fd01947 Merge pull request 'Close the visual-refresh-r4 task card (PR link + archive)' (#54) from feature/card-close-20260930-124602Z into main
ci / test (push) Failing after 1m33s
2026-09-30 12:46:28 +00:00
weichen d26187e43c Close 1 merged task card(s) and archive them
ci / test (pull_request) Failing after 1m34s
Why: branches merged into main had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: feature-visual-refresh-r4.md(PR#53) — merges verified via git log --merges against origin/main.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
2026-09-30 12:46:02 +00:00
weichen b069959819 Merge pull request 'R4 visual refresh: gitlinks + task card' (#53) from feature/visual-refresh-r4 into main
ci / test (push) Failing after 2m14s
2026-09-30 12:44:52 +00:00
weichen 73b2802b69 Advance frontend pin to merged R4 head
ci / test (pull_request) Failing after 1m37s
2026-09-30 12:43:42 +00:00
weichen 4789fb917e Record the sync checkpoint 2026-09-30 12:41:46 +00:00
weichen 599a6448d4 Land the R4 visual refresh across repos (gitlinks + task card)
Why: R4 spans ui (token scale) and frontend (icon set + restyle); the
Dev repo advances pointers and the task record.

Evidence: make test full suite green on this head (exit 0); headless
journey on the real binary across both themes with zero console errors
and zero leftover emoji glyphs.

Impact: pure visual layer. Merge order: ui -> frontend -> this PR.

Refs: proposal 2026-09-30-ui-redesign-and-auth.md (R4)
2026-09-30 12:41:45 +00:00
weichen c233773c69 Record the task card for feature-visual-refresh-r4 2026-09-30 12:24:50 +00:00
weichen 1fd4fade4a Merge pull request 'Close the svc-envfile task card (PR link + archive)' (#52) from feature/card-close-envfile into main
ci / test (push) Failing after 17m14s
2026-09-30 12:00:44 +00:00
weichen 346714141d Close the svc-envfile task card and archive it
ci / test (pull_request) Failing after 1m37s
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #51 merged; card records the env-file test matrix.

Impact: card archived with link; no code change.
2026-09-30 12:00:43 +00:00
weichen 55d21c2414 Merge pull request 'Support --env config files with CLI override' (#51) from feature/svc-envfile into main
ci / test (push) Failing after 1m38s
2026-09-30 12:00:33 +00:00
weichen 53fbfd7efd Record the sync checkpoint
ci / test (pull_request) Failing after 17m24s
2026-09-30 12:00:26 +00:00
weichen 52d0e45c81 Record the svc-envfile task card results 2026-09-30 12:00:25 +00:00
weichen 2460e49157 Support --env config files with CLI override
Why: per-environment bring-up needs a persistent file for the SVC_*
knobs (model keys, addresses, tavily pool) instead of relying on shell
history or the single global .svc.env; CLI flags must still win for
one-off overrides like a different port.

Evidence: live matrix - .env.dev parsed (comments, paired quotes,
export prefix) with its address and model values applied and seeded;
--port 8831 overrode the file's port while keeping its 0.0.0.0 host;
missing file fails fast; .svc.env and --env layer correctly (overlap
keys resolve to --env, disjoint keys merge).

Impact: --env FILE / --env=FILE anywhere on the command line; dotenv
parsed safely line-by-line (valid identifiers only, never sourced);
precedence CLI > --env file > .svc.env > OS env > defaults; help and
make svc ARGS examples updated.

Refs: feature/svc-envfile task card.
2026-09-30 12:00:25 +00:00
weichen 78fe0201e9 Record the task card for feature-svc-envfile 2026-09-30 11:59:27 +00:00
weichen 251bd94847 Merge pull request 'Close the svc-auto-seed task card (PR link + archive)' (#50) from feature/card-close-seed into main
ci / test (push) Failing after 17m17s
2026-09-30 11:57:06 +00:00
weichen 53462641c2 Close the svc-auto-seed task card and archive it
ci / test (pull_request) Failing after 1m57s
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #49 merged; card records the seeding test matrix.

Impact: card archived with link; no code change.
2026-09-30 11:56:59 +00:00
weichen 0e236bcbdc Merge pull request 'Seed model and search settings on service start' (#49) from feature/svc-auto-seed into main
ci / test (push) Failing after 1m39s
2026-09-30 11:56:50 +00:00
weichen e371a3c4fa Record the sync checkpoint
ci / test (pull_request) Failing after 1m56s
2026-09-30 11:56:42 +00:00
weichen 5c2fa4562b Record the svc-auto-seed task card results 2026-09-30 11:56:41 +00:00
weichen 81ac0ca5c2 Seed model and search settings on service start
Why: a freshly deployed environment boots with an empty settings store,
so the first run dies with "main model unconfigured" and the user has
to open the settings UI before anything works - the opposite of
one-command bring-up.

Evidence: live matrix - full seed (chat+lightweight+tavily) lands in
the settings store (API view shows baseUrl/model with the key masked),
restart without flags does not re-seed and the settings persist,
.svc.env sourcing seeds a fresh environment from the one-time config
file, and a no-flag start stays silent. Also wrapped a /proc read race
in pid_alive that printed tr noise during stop.

Impact: --model-base/--model-key/--model-name, --light-base/-key/
-name, --tavily-keys on start/deploy (idempotent, only provided
fields); SVC_MODEL_*/SVC_LIGHT_*/SVC_TAVILY_KEYS env vars; <repo>/
.svc.env one-time config file (gitignored) makes every future deploy
self-configuring; auth-protected instances fall back to a clear hint.

Refs: feature/svc-auto-seed task card.
2026-09-30 11:56:41 +00:00
weichen 82c2417edb Record the task card for feature-svc-auto-seed 2026-09-30 11:54:54 +00:00
weichen f832f0413e Merge pull request 'Close the svc-cli-args task card (PR link + archive)' (#48) from feature/card-close-cli into main
ci / test (push) Failing after 1m36s
2026-09-30 11:50:48 +00:00
weichen 1615eb5996 Close the svc-cli-args task card and archive it
ci / test (pull_request) Failing after 1m34s
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #47 merged; card records the live flag matrix.

Impact: card archived with link; no code change.
2026-09-30 11:50:41 +00:00
weichen 7bd62ecf06 Merge pull request 'Add CLI flags to svc.sh (addr/host/port/data/dsn/auth/mock/passthrough)' (#47) from feature/svc-cli-args into main
ci / test (push) Failing after 1m36s
2026-09-30 11:50:33 +00:00
weichen 604b12ab06 Record the sync checkpoint
ci / test (pull_request) Failing after 17m6s
2026-09-30 11:50:25 +00:00
weichen e3ba86aa16 Record the svc-cli-args task card results 2026-09-30 11:50:24 +00:00
weichen 8a494e87c7 Add CLI flags to svc.sh (addr/host/port/data/dsn/auth/mock/passthrough)
Why: the manager only took configuration from SVC_* environment
variables; binding a public interface or pointing at a database meant
exporting vars first, which is awkward for one-off deploys and
invisible in shell history review.

Evidence: live matrix on the worktree - --port (8801), --host 0.0.0.0
(bind verified via ss, health probe auto-maps to 127.0.0.1), --addr
whole-form, CLI-over-env precedence (--port beats SVC_DEV_ADDR),
--mock reaching the server cmdline, --dsn passthrough proven by the
postgres connect attempt in the log, -- passthrough (--artifacts), and
make svc ARGS passthrough. A set -e silent-exit trap in env_config was
caught by the first run and fixed (condition-as-last-statement).

Impact: scripts/svc.sh <env> [action] [--addr|--host|--port|--data|
--dsn|--auth|--mock|--plugins| -- <extra>]; precedence CLI > env vars >
defaults; help rewritten with examples; make svc gains ARGS; logs keeps
the positional line-count form. The real-world port guard held: a dev
instance started from the main checkout was refused with owner info,
untouched.

Refs: feature/svc-cli-args task card.
2026-09-30 11:50:24 +00:00
weichen 1ac864a0b5 Record the task card for feature-svc-cli-args 2026-09-30 11:47:03 +00:00
weichen 1174431ee6 Merge pull request 'Close the svc-env-script task card (PR link + archive)' (#46) from feature/card-close-svc into main
ci / test (push) Failing after 30s
2026-09-30 11:39:20 +00:00
weichen 4cdeeabfb9 Close the svc-env-script task card and archive it
ci / test (pull_request) Failing after 31s
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #45 merged; card records the live test matrix.

Impact: card archived with link; no code change.
2026-09-30 11:39:12 +00:00
weichen 5b81f82120 Merge pull request 'Add the svc.sh environment service manager' (#45) from feature/svc-env-script into main
ci / test (push) Failing after 31s
2026-09-30 11:38:57 +00:00
weichen c1eea4b05b Record the sync checkpoint
ci / test (pull_request) Failing after 1m31s
2026-09-30 11:38:44 +00:00
weichen f0e7831ed1 Record the svc-env-script task card results 2026-09-30 11:38:43 +00:00
weichen 35d114307d Add the svc.sh environment service manager
Why: deploying a new build meant manually finding and killing the old
process, rebuilding and re-launching with the right flags; dev and prod
instances could collide on ports, data dirs or kill each other.

Evidence: live matrix on the worktree - dev deploy (stop -> make build
-> start with health check), redeploy swaps the pid and keeps seeded
data, prod deploys alongside dev on separate port/data with fully
isolated /api/projects, port takeover is refused with the owning
process named while the running env stays up, stop clears pidfile and
frees the port. A pid-capture bug (compound-background subshell wrote
the wrapper pid instead of the server) was caught and fixed during the
first live run.

Impact: scripts/svc.sh <dev|prod> [deploy|stop|start|restart|status|
logs]; runtime/<env>/{data,svc.pid,svc.log,svc.env} isolation; defaults
dev 127.0.0.1:8788 / prod 127.0.0.1:8787 overridable via SVC_* env
vars (incl. SVC_PROD_DSN for the PG tier); make svc ENV=... shortcut;
runtime/ gitignored. Safety: only processes started by the script are
stopped (pidfile + /proc cmdline double check).

Refs: feature/svc-env-script task card.
2026-09-30 11:38:43 +00:00
weichen c2e5ca5211 Record the task card for feature-svc-env-script 2026-09-30 11:19:29 +00:00
weichen fcddfee5be Merge pull request 'Close the auth-admin-accounts task card (PR link + archive)' (#44) from feature/card-close-20260930-111808Z into main
ci / test (push) Failing after 1m31s
2026-09-30 11:18:22 +00:00
weichen ac38507cee Close 1 merged task card(s) and archive them
ci / test (pull_request) Failing after 1m41s
Why: branches merged into main had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: feature-auth-admin-accounts.md(PR#43) — merges verified via git log --merges against origin/main.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
2026-09-30 11:18:08 +00:00
weichen 2f319ca0f5 Merge pull request 'Admin-issued accounts R2: gitlinks + task card' (#43) from feature/auth-admin-accounts into main
ci / test (push) Failing after 1m36s
2026-09-30 11:17:31 +00:00
weichen 66eae89017 Advance frontend pin to merged PR #12 head
ci / test (pull_request) Failing after 30s
2026-09-30 11:17:12 +00:00
weichen a633f76a99 Merge origin/main (tavily-search sync; backend/documents rebased) 2026-09-30 11:15:49 +00:00
weichen e6ad8f06ac Land admin-issued auth R2 across repos (gitlinks + task card)
Why: R2 spans backend (migration v10, auth/session APIs, CLI user
subcommands), frontend (login page, forced change gate, admin user
management), documents (decision record).

Evidence: make test full suite green on this head (exit 0); headless
journey on the real binary with --auth on covers admin bootstrap,
first-login forced change for created and reset passwords, non-admin
menu gating, API-key login, logout.

Impact: auth-enabled deployments gain password login and admin account
management; embedded no-auth mode unchanged. Merge order: backend ->
frontend -> documents -> this PR.

Refs: proposal 2026-09-30-ui-redesign-and-auth.md (R2 admin-issued)
2026-09-30 11:15:06 +00:00
weichen 27408ecfaf Merge pull request 'Close the tavily-search task card (PR link + archive)' (#42) from feature/card-close-tavily into main
ci / test (push) Failing after 31s
2026-09-30 11:00:52 +00:00
weichen 024d60b362 Close the tavily-search task card and archive it
ci / test (pull_request) Failing after 31s
Why: merged combo card needs its PR link backfilled and the card
archived per the no-bookkeeping-debt rule.

Evidence: Dev PR #41 merged; card records both boot-state checks.

Impact: card archived with link; no code change.
2026-09-30 11:00:44 +00:00
weichen a40de58838 Merge pull request 'Pin the tavily-search combo (tool wiring + prompt modules)' (#41) from feature/tavily-search-tool into main
ci / test (push) Failing after 30s
2026-09-30 11:00:36 +00:00