Skip to content

Trace displayed/stored data to its producer before fixing (no downstream masking) - #2198

Open
Userdebug wants to merge 1 commit into
obra:mainfrom
Userdebug:skills/trace-displayed-data-to-producer
Open

Trace displayed/stored data to its producer before fixing (no downstream masking)#2198
Userdebug wants to merge 1 commit into
obra:mainfrom
Userdebug:skills/trace-displayed-data-to-producer

Conversation

@Userdebug

Copy link
Copy Markdown

Problem

While debugging a real application, a wrong stored value ("Mensualité 11" — a month number baked into a DB label by an old seed script) was surfaced in the UI. The agent's first "fix" was a display formatter that rewrote the label at render time. That masked the bug instead of fixing it: every other consumer of the stored value kept showing bad data.

The root-cause discipline already exists in systematic-debugging (Phase 1 / Phase 4), but it didn't trigger because the symptom looked like a display concern. Nothing forces tracing a wrong value to its producer before designing or shipping a downstream transformation.

Changes

skills/systematic-debugging/SKILL.md

  • Phase 1: new step "6. Trace Displayed/Stored Data To Its Producer" — locate who writes the value (SQL writer / service / seed) and its schema before proposing any fix; "a display bug is a data bug until proven otherwise"; never compensate downstream; documents the three-part complete fix:
    1. fix generation at the producer (single canonical generator)
    2. idempotently migrate existing rows (startup migration pattern)
    3. align seed/test fixtures with production format
    • includes the real-world case study as an example
  • Phase 4: "Implement Single Fix" now states the root cause is the producer of the bad data and that fixes include migration when existing rows are wrong
  • Red Flags: new bullet — "It's just a display issue, a formatter/parser will do"
  • Common Rationalizations: matching row for downstream formatters

skills/brainstorming/SKILL.md

  • Bounded path step 1 (Explore project context): if the request fixes an incorrect displayed/stored value, trace it to its producer first — so a downstream-masking design never gets approved in the first place

Testing

Applied and exercised end-to-end in a production PyQt app: labels regenerated via a single canonical generator (libelle_mensualite(mois)), ~60 legacy rows migrated by an idempotent startup migration, seeds aligned, band-aid formatter deleted. Test suite went from 20 failed / 112 passed → 12 failed / 140 passed on a fresh database (8 pre-existing failures fixed as a side effect of cleaning the data contract). The patched skills are also mirrored locally with a re-injection script to survive package updates.

A wrong displayed or stored value (bad label, stale format) must be
traced to its producer before any fix is proposed. Display bugs are
data bugs until proven otherwise.

systematic-debugging gains an explicit Phase 1 step (6. Trace
Displayed/Stored Data To Its Producer) that requires locating the
writer (SQL/service/seed) first and forbids compensating downstream
with a UI formatter/parser that masks badly stored data. It documents
the three-part real fix: canonical generator at the source, idempotent
migration of existing rows, seeds aligned with production.

Phase 4 now states that the root cause is the PRODUCER of the bad data
and that fixes include migration when existing rows are wrong. Matching
entries are added to Red Flags and Common Rationalizations.

brainstorming's Bounded step 1 gets the same provenance check at design
time, so a downstream-masking design never gets approved in the first
place.
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