Migrate do-harness.toml to the current [[sensors]] schema (do-harness CLI 0.6.0 cannot parse it)

Offen Anfängerfreundlich
#1,219 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
90/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
bash, github-actions, shell

Rechercherichtung

Lies den Sensorvertrag in docs/adoption.md und untersuche anschließend do-harness.toml sowie tests/do-harness-path-selection.bats. Aktualisiere die Konfiguration und die Assertions zur Pfadauswahl, sodass sie das aktuelle [[sensors]]-Schema verwenden, während die Ausrichtung von Offline-Pfaden und CI-Pfadfiltern erhalten bleibt. Erledigt ist dies, wenn do-harness explain --changed die Datei parst, schema-version 1 ist und die Tests zur Pfadauswahl bestanden werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

chore config priority: low

Summary

do-harness.toml uses the legacy [sensors.<name>] map shape. The current do-harness CLI (v0.6.0) rejects it:

$ do-harness explain --changed
error: invalid config file do-harness.toml: TOML parse error at line 7, column 2
7 | [sensors.feedback]
  |  ^^^^^^^
invalid type: map, expected a sequence

do-harness migrate cannot fix it automatically (--write refuses: "refuses conflicts it cannot resolve"); its dry run only offers schema-version = 1, which still leaves the map-vs-sequence mismatch.

Required change

  1. Rewrite do-harness.toml to the [[sensors]] array contract (name, argv, when-changed, severity, timeout per docs/adoption.md):
    • command = "pnpm run lint && ..." becomes argv = ["bash", "-lc", "pnpm run lint && ..."] (argv is executed without a shell).
    • paths maps to when-changed globs.
    • Name the advisory/lifecycle semantics explicitly (severity = "warn" for advisory sensors, --strict behavior documented).
  2. Update tests/do-harness-path-selection.bats, which asserts the old shape (tomllib.load(f).get("sensors", {}) + s in sensors): with [[sensors]], tomllib yields a list, so the membership assertion must index by name instead.
  3. Keep the offline-paths ↔ CI path-filter alignment assertions green (do-harness-path-selection.bats checks alignment with the CI workflow's path filters).
  4. Bump schema-version to 1 in the same change.

Impact

  • Unblocks the entire do-harness CLI workflow (verify, explain, status, hook install) in this repository; today every command exits with a config error.
  • No behavior change to CI; the file feeds only the local agent harness.

References

Vorherrschende Sprache
TypeScript
Sterne
3
Forks
2
Ø Merge
11 Std. 49 Min.
Gemergte PRs (30 T.)
102

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus d-oit/do-knowledge-studio

Alle Issues in d-oit/do-knowledge-studio

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.