Post-#149 review pass 4: 1 medium + 2 low findings (asymmetric migration, script hygiene) #151
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#151
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fourth-pass review on the broader stack at HEAD
e12ddab, dedup'd against everything filed today (#148 closed, #149 in flight with finding 2 added today as note, #150 MR !374 pending merge). three real findings, all hand-verified.a fourth finding (second instance of #149 finding 4
LOWER(...)index defeat ontimecurve_warbow_steals_by_victim_day) was flagged inline on #149 since the fix is identical to that ticket's existing patch.ordered by severity descending. finding 1 is a deploy / rollback hygiene gap worth pre-mainnet attention; findings 2 and 3 are post-deploy hardening.
Finding 1 — Indexer:
20260504180000_timecurve_unredeemed_launched_tokenmigration ships .up.sql with no .down.sql (Medium)indexer/migrations/listing:every other migration in the directory ships a paired
.down.sql(verified spot-checks). this one shipped.uponly.concrete consequence: rollback of this schema step (the unredeemed-launched-token table introduced for the #128 sweep flow) cannot run via the migration runner. an operator forced to revert post-deploy must drop the table by hand, and the migrator's
_sqlx_migrationsversion table will not be reconciled — blocking automated re-application of the same version. on a TGE-bound deploy with an active rollback plan this is a failure mode worth closing pre-mainnet.mitigation: add
20260504180000_timecurve_unredeemed_launched_token.down.sqlcontaining the inverseDROP TABLE IF EXISTS …(and any related index drops) so the pair is symmetric with the rest of the migration set.Finding 2 — Script:
start-qa-local-full-stack.shbackground Vite has no trap; orphans on orchestrator death (Low)scripts/start-qa-local-full-stack.sh:115-128:backgrounds
npm run dev, writes PID — but notrap … EXIT INT TERMupstream to kill it on script abort.concrete failure mode: if the orchestrator dies or the user Ctrl-Cs after the readiness loop has begun, the Vite child keeps holding
${FRONTEND_DEV_PORT:-5173}. nextstart-qa-local-full-stack.shinvocation either:I've actually hit the silent-orphan version of this today during the #150 stack bring-up — anvil orphan held 8545 from a previous failed run and the second attempt's readiness probe falsely passed against it. same shape applies to Vite here.
mitigation: add a trap inside the launching function before the background invocation:
or have the readiness loop fail-closed if curl ever returned 0 BEFORE the loop's first sleep (catches stale-orphan masquerading as fresh-ready).
Finding 3 — Library:
_yieldomega_env_set_linesed escaping is fragile (Low — preventive)scripts/lib/kumbaya_local_anvil_env.sh:37-52:${key}is interpolated unescaped into the regex side and${val}is interpolated unescaped into the replacement side of thesedcommand. header at L37 acknowledges "hex addresses — avoid special chars in values".today's callers (
VITE_KUMBAYA_*keys,0x-prefixed addresses) are safe. but the helper is reused via:yieldomega_frontend_merge_kumbaya_vite_fullyieldomega_frontend_merge_vite_kumbaya_buy_router_onlythe moment any future caller passes a value containing
&,\, or#(path separators, signed payloads, base64 with/in it, etc.), the replacement becomes silently wrong (&re-injects the matched LHS,#ends the s-expression early,\injects backreferences). silent corruption rather than loud failure.mitigation: pre-escape both sides:
or switch to a different in-place editor (awk, python, dedicated env-file lib) that doesn't treat values as regex. preventive — no exploit today, but the moment someone adds a key with a non-trivial value the breakage will be silent.
Pre-deploy relevance
cc @PlasticDigits
mentioned in issue #152
marked this issue as related to #152
mentioned in issue #153
marked this issue as related to #153
mentioned in issue #154
marked this issue as related to #154
Split into tracked follow-ups (verified still present at
mainHEAD): #152 migration.down.sql, #153 Vite orphan/trap instart-qa-local-full-stack.sh, #154_yieldomega_env_set_linesed hardening. The duplicateLOWER(...)index note remains on #149 per inline comment.@PlasticDigits — closing this umbrella now that all 3 child tickets shipped:
.down.sql) ✓ closedno remaining work on the parent.