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 synced resource schemas feed the stale template, then add the date-time field union at generation time with focused regression coverage. 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 using targetedfind/grepsearches instead. I’m first locating the template data model and existing generator tests to keep this a systemic Printing Press fix. - Assistant
The stale command reads the generic synced-resource JSON, so the fix belongs in workflow rendering: identify the profiler-selected sync endpoints, collect their response fields marked
format: date-time, and append only non-default names to the existing ordered allowlist. This preserves every current default and avoids duplicateupdated_atentries. - Assistant
The implementation and regression test are in place. I’m validating in offline mode; the first Go invocation attempted module resolution, so I stopped it and will keep all remaining test commands constrained with
GOPROXY=offto honor the no-internet requirement. - Assistant
The generator-level assertions pass far enough to confirm rendering, but the nested generated-CLI test cannot compile offline because its separate module dependencies (Cobra, TOML, SQLite) are not cached. I’m keeping the end-to-end regression test for CI and adding a dependency-free unit test around field selection so the core behavior can still be verified locally without weakening coverage.
- Assistant
Focused offline tests now pass, including deterministic selection, additive default preservation, generated source, and the end-to-end test fixture construction. I’m moving to repository-wide formatting/tests and golden verification; any unavailable uncached dependency will be reported distinctly from a code failure.
- Assistant
The first full-suite attempt hit the container’s process limit (
fork/exec … resource temporarily unavailable), not test assertions. I’m rerunning with Go parallelism capped so the suite can complete within the environment. Golden verification is separately blocked because this image lacksjq. - Assistant
The implementation is clean and the Printing Press binary builds offline. I’ve kept the generated-CLI end-to-end test unconditional for normal CI rather than weakening it for this container; locally, its compile step remains blocked only by uncached dependencies, while the dependency-free regression tests pass.
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 →