Skip to content

examples/bugzilla-retriage.json: hardcoded 2020-01-01 cutoff contradicts the included "over two years" prompt #27

@joewalker

Description

@joewalker

Observed behavior

src/examples/bugzilla-retriage.json filters Bugzilla with:

"advanced": [
  {
    "field": "creation_ts",
    "matchType": "lessthan",
    "value": "2020-01-01"
  }
]

and uses "promptTemplate": "{{include:./bugzilla-retriage.md}}", which in turn says:

This bug has been open for over two years.

As of today (2026-05-19) the cutoff is over six years in the past, not two. The sibling src/examples/bugzilla-retriage.ts computes a true today - 2 years cutoff at runtime:

const twoYearsAgo = new Date();
twoYearsAgo.setFullYear(twoYearsAgo.getFullYear() - 2);
// ...
value: twoYearsAgo.toISOString().slice(0, 10),

so the .ts example and the .json example disagree on what "over two years" means, and the .json flavour has drifted further out of step every year since 2022. The agent is told a fact about the bug that is not actually guaranteed to be true for the bugs in the query result.

Expected behavior

The .json example and the included prompt should agree on the cutoff. Either the prompt wording should be loosened (e.g. "this bug has been open for a long time") or the cutoff should be expressed in a way that tracks "two years before today". The CLI JSON config format does not currently let you express "today minus N years" declaratively, so realistic options are:

  1. Update the wording in bugzilla-retriage.md to match a static cutoff, and bump 2020-01-01 to something current (and add a comment explaining it is a snapshot that must be updated by hand).
  2. Drop the .json flavour of this example and keep only the .ts flavour, which can compute the cutoff dynamically.
  3. Add a way to expand date macros (e.g. {{date:today-2y}}) in JSON configs and use that here.

Minimal reproduction

cat src/examples/bugzilla-retriage.json | jq '.promptGenerator[1].search.advanced'
cat src/examples/bugzilla-retriage.md | grep 'two years'

Compare the 2020-01-01 cutoff against the prompt's "over two years" claim against today's date.

Severity

S4. Cosmetic / documentation drift in an example file. The example still runs and still returns bugs that match the query, but the prompt no longer accurately describes the data fed to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S4Clean-ups or nits with low behavioral riskbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions