🎙️ task - fix(repo): coerce empty-string homepage/description to null (perpetual UPDATE drift)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 82/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- github, typescript
- Bereich
- backend-api-design
Rechercherichtung
Beginne in src/domain.operations/repo/castToDeclaredGithubRepo.ts bei den Casts von homepage und description auf den Zeilen 47–48. Untersuche auch setRepo, um festzustellen, ob dort dieselbe Normalisierung erforderlich ist. Überprüfe den Fix mit dem gemeldeten Szenario aus plan, apply und re-plan und bestätige, dass null-Werte konvergieren, ohne dass es zu einer anhaltenden UPDATE-Abweichung kommt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
🦫🎙️ dispatch to foreman
💧 task enqueued
├─ priority = ?
├─ yieldage = ?
└─ leverage = ?
title
fix(repo): coerce empty-string homepage/description to null (perpetual UPDATE drift)
description
.what
castToDeclaredGithubRepo casts an empty-string homepage (and description) from the GitHub API to an empty string, but the natural desired value is null. The two never converge, so every declastruct plan on a DeclaredGithubRepo shows a homepage empty-string to null UPDATE, and every apply is a no-op that re-stores the empty string. The resource is never idempotent.
.where
src/domain.operations/repo/castToDeclaredGithubRepo.ts (main / 1.7.0)
description: input.description ?? null, // line 47
homepage: input.homepage ?? null, // line 48
.root-cause
GitHub's REST API returns homepage and description as an empty string for repos with no homepage/description set — NOT null. the ?? null coalesce only fires on null/undefined, so an empty string stays an empty string.
- remote casts to
homepage= empty string - a natural wish declares
homepage: null(there is no homepage) - empty string is not equal to null, so declastruct decides UPDATE, forever
.repro
- declare a
DeclaredGithubRepowithhomepage: null(repo has no homepage set on github) declastruct plan-> showshomepageempty-string vs null UPDATEdeclastruct apply-> no-op (github stores empty string again)- re-plan -> same UPDATE. never converges.
observed on ahbode/infrastructure provision/github.repo at declastruct-github 1.6.0; confirmed unchanged on main (1.7.0).
.fix
coerce empty string to null in the cast, so remote matches a null wish:
description: input.description || null, // empty string -> null
homepage: input.homepage || null, // empty string -> null
(|| null is safe here — both fields are free-text where empty string and "unset" are equivalent; there is no meaningful empty-string value to preserve.)
alternatively, if you prefer to keep ?? semantics elsewhere, an explicit input.homepage?.trim() || null also handles whitespace-only values.
.also-consider
whichever coercion you choose, apply it symmetrically on the SET side (setRepo) if it sends homepage/description, so a null wish is written consistently and a round-trip get -> cast -> set is stable.
.impact
- breaks idempotency guarantee for
DeclaredGithubRepo(always dirty) - noise in every plan; erodes trust in the KEEP vs UPDATE signal
- forces consumers to declare
homepageas an empty string (matching the buggy cast) as a workaround, which is backwards
- Vorherrschende Sprache
- TypeScript
- Sterne
- 0
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ehmpathy/declastruct-github
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 42/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
Alle Issues in ehmpathy/declastruct-github
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
components-web-app/docs#307 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
localstack/localstack-mcp-server#112 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:frontend kind:bug priority:p1 ready
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
PhyberApex/kuroshiro#1687 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Performance (Web Vitals) collector: LCP/FCP from background tabs are not discarded, inflating p75Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
umami-software/umami#4720 ·
Maintainer antworten meist innerhalb von 3 Tagen