You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
question-log: caller-supplied ts can backdate rows past the per-day bound #3445
#3397 bounds each dimension per UTC day of a row's ts. gstack-question-log keeps any ts the caller supplies (if (!j.ts) j.ts = new Date().toISOString()), with no format check, no clamp to now and no rejection of future dates, so a confused or prompt-injected agent that writes rows with many distinct dates gets a full day's bound for each and inflates diversity.days_span. JS Date also rolls impossible dates forward (2026-02-30 → March 2). Derive already treats non-ISO ts as undated.
Options: have the writer always stamp ts itself (keeping a caller value as ts_source), or clamp to ≤ now. Either must keep legitimate backfill working: the Codex session import passes historical timestamps.
Triage from the GStack Minder plan-tune lane (GSTA-216): dropping this one, because nothing real calls it and the effect stays inside an advisory display.
What I tried, on main at 3bfe566: gstack-question-log does keep whatever ts it's given. 2020-01-01, 2099-12-31T00:00:00Z, 2026-02-30 and junk were all written as given. But no production writer sends a made-up ts:
the preamble's logging template (scripts/resolvers/question-tuning.ts) has no ts field;
both Claude hooks (question-log-hook.ts, question-preference-hook.ts) leave it out;
the only writer that sends one is gstack-codex-session-import, with the real historical timestamp, which is the backfill this issue says must keep working.
So the only way to hit this is an agent that adds a fabricated ts on its own, and all it would change is /plan-tune's inferred profile. That profile is display-only ("The profile never changes defaults"), so nothing a user relies on changes. Reopen with a real writer that sends wrong timestamps and I'll pick it up.
Closing as won't-fix. The question log is a local record written by the agent session itself, so a caller-supplied timestamp can only mislabel that session's own rows, and nothing downstream gates on them. A fix would also have to handle backfilled imports correctly, which an earlier attempt didn't. If you hit a case where a backdated row changes a real outcome, reopen it with the steps.
Activity
capy-ai commentedon Oct 31, 2026
Triage from the GStack Minder plan-tune lane (GSTA-216): dropping this one, because nothing real calls it and the effect stays inside an advisory display.
What I tried, on main at 3bfe566:
gstack-question-logdoes keep whatevertsit's given.2020-01-01,2099-12-31T00:00:00Z,2026-02-30andjunkwere all written as given. But no production writer sends a made-upts:scripts/resolvers/question-tuning.ts) has notsfield;question-log-hook.ts,question-preference-hook.ts) leave it out;gstack-codex-session-import, with the real historical timestamp, which is the backfill this issue says must keep working.So the only way to hit this is an agent that adds a fabricated
tson its own, and all it would change is/plan-tune's inferred profile. That profile is display-only ("The profile never changes defaults"), so nothing a user relies on changes. Reopen with a real writer that sends wrong timestamps and I'll pick it up.capy-ai commentedon Nov 4, 2026
Closing as won't-fix. The question log is a local record written by the agent session itself, so a caller-supplied timestamp can only mislabel that session's own rows, and nothing downstream gates on them. A fix would also have to handle backfilled imports correctly, which an earlier attempt didn't. If you hit a case where a backdated row changes a real outcome, reopen it with the steps.