Skip to content

Ask knows what day it is; pin the notebook's re-tag behaviour - #249

Merged
TruongGiang2000 merged 2 commits into
mainfrom
fix/ask-knows-today
Oct 9, 2026
Merged

TruongGiang2000 merged 2 commits into
mainfrom
fix/ask-knows-today

Conversation

@TruongGiang2000

Copy link
Copy Markdown
Collaborator

Two follow-ups from #248.

Ask knows what day it is

Told "runway is 8 months" on 9 Oct 2026, Finance dated the deadline "June 2026", because nothing in the Ask context said what today was.

The context now opens with Today is 2026-10-09 (October 2026). Count any deadline or runway from this date. The date sits in the per-request context, not the cached system prompt, which has to stay byte-identical across days for the prefix cache to hit. It goes first so the CONTEXT_CAP clip can't trim it.

Pinned the notebook's re-tag behaviour (the review minors from #248)

  • An ordinary turn right after a Finance turn records no department, and re-recording the same topic takes it off Finance's desk.
  • A company-wide re-record clears the tag at merge level.
  • Once Sales re-records Finance's price, Finance's desk no longer lists it and Sales' does.

These are characterisation tests. The behaviour was already correct; they fail if it stops being.

On the remaining #248 minor (cap 60 and token cost): chat context is clipped at CONTEXT_CAP (12,000 chars), so that cost is bounded. extractDecisions still sends every existing decision uncapped. It is unchanged here and noted for later.

Verified

  • ChatContextTodayTests (3), which were red until compose took a date.
  • testTheChatRequestCarriesTodaysDate: red with the store's today: Date() removed, green with it.
  • ChatContext ×8, CompanyStoreChatTests, DepartmentNotebookTests and DepartmentSpecialistReachesModelTests all pass.
  • In the app on a real account, "Ask Finance: if our runway were 8 months from today, in which month and year would the money run out?" got "October 2026 + 8 months = cash gone in June 2027". Before this, the same kind of question gave "June 2026".

🤖 Generated with Claude Code

TruongGiang2000 and others added 2 commits October 9, 2026 11:11
Told 'runway is 8 months' on 9 Oct 2026, Finance dated the deadline
'June 2026': nothing in the Ask context said what today was. The context
now opens with 'Today is 2026-10-09 (October 2026)', ISO for arithmetic and
the month name so a deadline lands on a month the model can name.

In the per-request context, not the cached system prompt, which must stay
byte-identical across days for the prefix cache to hit. First in the
context so the CONTEXT_CAP clip can never trim it. Store-level test pins
that the request carries it (red with the store line removed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An ordinary turn straight after a Finance turn records no department,
  and its re-record of the same topic takes it off Finance's desk.
- A company-wide re-record clears the tag at merge level.
- End to end: once Sales re-records Finance's price, Finance's desk no
  longer lists it and Sales' does.
Characterisation tests: the behaviour was already right; these fail if
it stops being so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TruongGiang2000
TruongGiang2000 merged commit ddcadb6 into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant