Stale-detection timestamp-field allowlist misses spec-declared date fields Retro finding…
- User
Stale-detection timestamp-field allowlist misses spec-declared date fields Retro finding · priority: P2 · component: generator · source: Trello CLI generation (printing-press 4.9.0)
What happened
The generated
internal/cli/pm_stale.gomatches inactivity against a hardcodedstaleTimestampFieldsallowlist (updatedAt, updated_at, updatedDate, modifiedAt, modified_at, lastModified, last_modified, lastEditedTime, last_edited_time, updated, last_updated). Trello cards usedateLastActivity, which is absent. The flagshipstalecommand returned "No stale items found" while a hand-builthealthcommand (readingdateLastActivity) counted 93 stale cards on the same hydrated data. Silent-empty flagship command, no error.Root cause
The stale template hardcodes a timestamp-name allowlist instead of also deriving candidate timestamp fields from the spec (properties with
format: date-time).Durable fix (proposed)
Build the stale timestamp-field set as
hardcoded allowlist ∪ spec-declared date-time property names for the synced resources. Guard: union is additive only — never removes existing allowlist entries, so no regression for currently-working APIs.Test
- Positive: a spec with a
dateLastActivity(format: date-time) card property produces astalethat finds rows older than N days. - Negative: an API using
updated_atis unchanged.
Repro / evidence
trello-pp-cli stale --days 14→ empty;trello-pp-cli health→ 93 stale on the same mirror. Fixed by hand-addingdateLastActivityto the allowlist. The allowlist approach will keep silently breaking the flagship command for the next API with an unlisted activity field.Interface
No new interfaces are introduced.
- Positive: a spec with a
- Assistant
I’ll trace how sync resource schemas reach the stale template, then add the spec-derived date-time union with focused generator/runtime tests. I’ll also run formatting, the relevant package tests, the full Go suite, and golden verification because generated output may change.
- Assistant
rgisn’t installed in this workspace, so I’m falling back to targetedgrep/findsearches. - Assistant
The workflow renderer currently passes only the API spec, even though it already has the profiler’s exact sync-resource set available. I’m threading a deterministic timestamp union through that shared render data: legacy names retain their order, and date-time fields are added only when their response endpoint participates in sync.
- Assistant
The focused test now proves both sides at runtime:
dateLastActivityfinds an old synced row, while the existingupdated_atfallback still finds another row. It also confirms a date-time field from a non-sync endpoint is excluded. I’m moving on to repository-wide formatting/tests and golden stability. - Assistant
Golden verification is blocked by the workspace image: the harness exits immediately because
jqis not installed. No golden files were changed. I’ll still run the complete Go test suite and build, which exercise generated CLI compilation and the new runtime behavior. - Assistant
The first full-suite attempt exhausted the container’s process limit (
fork/exec … resource temporarily unavailable), not a code failure. I’m retrying with Go package parallelism capped so the suite fits the environment. - Assistant
The capped full suite progressed through nearly all packages but generator/CLI integration tests still hit the host thread/process ceiling inside nested Go linkers; the failure traces are runtime resource exhaustion. The production binary builds successfully with constrained parallelism. I’m doing one isolated generator-package pass with
GOMAXPROCS=2so nested generated builds inherit the cap. - Assistant
The isolated generator suite is still running cleanly under the lower concurrency cap; it is quiet because this package buffers generated-build output unless a test fails.
- Assistant
The filtered rerun has not reported any test assertion failure so far. I’m specifically capturing only failed test names and resource-exhaustion signatures now, which avoids the package’s very large expected warning stream obscuring the result.
- Assistant
The isolated suite’s sole failing test is unrelated and reproducible alone: its generated-CLI
govulncheckgate flags GO-2026-5856 in this image’s Go 1.26.4 standard library (fixed in Go 1.26.5). There are no implementation assertion failures. I’m doing the final focused regression run and workspace diff check now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →