You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/apps/hq/scripts
Thomas Joise b146de990f fix(scripts): audit + guard apply-onboarding-pipeline's setting writes
Final whole-branch review FIX 2.

The live-deploy script upserted the onboarding template settings with raw
SQL (ON CONFLICT DO UPDATE), bypassing setSetting -> no audit row, violating
the append-only-audit rule -- and it unconditionally overwrote templates an
owner may have already edited in the Modules onboarding-template editor,
making the "Idempotent" header comment false and dangerous for a script that
runs against ~167 real projects.

Upserts now go through setSetting(db, 'system', key, value) (audited), and
only write a key that is still absent, unless run with an explicit --force
argument (documented). Header comment corrected to say idempotency holds
only while the templates haven't been owner-edited, and that --force
overwrites unconditionally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 day ago
..
apply-ltd-numbers.ts chore(d35): script to append directory-sourced LTD numbers to client names 2 days ago
apply-name-fixes.ts chore(d35): script to apply approved client-name corrections (audited) 2 days ago
apply-onboarding-pipeline.ts fix(scripts): audit + guard apply-onboarding-pipeline's setting writes 1 day ago
backup-hq.sh docs(hq): go-live runbook, env template and S3 backup script 1 week ago
demo-seed.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
gmail-connect.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
import-apex-full.ts feat(d20): importer v2 rework from the 46-agent real-data audit 4 days ago
import-employees.ts feat(d34): import employee master + invited/pending-login flag 2 days ago
migrate-onboarding-templates.ts fix(onboarding-migration): preserve ad-hoc custom steps across the template swap 1 day ago