Skip to content

Datadog Monitor 探索を Module Runner 化し chargeflow を導入#32

Merged
keyskey merged 13 commits into
mainfrom
feat/module-runner-datadog
May 28, 2026
Merged

Datadog Monitor 探索を Module Runner 化し chargeflow を導入#32
keyskey merged 13 commits into
mainfrom
feat/module-runner-datadog

Conversation

@keyskey

@keyskey keyskey commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Datadog 連携を internal/integration/datadog(公式 SDK)から modules/datadog / hado-datadog-puppup CLI 経由)の Module Runner 実装へ移行した
  • internal/chargeflow を導入し、cmd/hado/charge を domain charger 駆動の薄い CLI adapter に整理した
  • hado charge --datadog-discover--coverage-module を廃止し、manifest 宣言のみで module を選ぶ(coverage / observability 対称)
  • Datadog discovery を Monitor / SLO の集合同期に拡張(services[] OR、hado_tags / env AND、複数マッチ可、0 件は失敗、manual refs は保持・auto は全置換)
  • internal/coverage を adapter 非依存の domain model(Measurement)として整理し、単方向依存ルールを Cursor rule に追加した
  • ドキュメントを docs/spec/(振る舞い・契約)と docs/design/(設計検討)に再構成し、重複 stub と implementation-status.md を削除した

主な変更

Charge / chargeflow

  • chargeflow.Execute が coverage / observability の各 Charger を順に実行
  • coverage: evidence.coverage.module のみ参照(CLI override なし)
  • observability: standard の gate と manifest の discovery.datadog に応じて Monitor / SLO lane を charge

Datadog module

  • monitor.go / slo.go / discover.go に分割
  • DatadogDiscovery: hado_tags, services[], envname_contains / 単一 service は削除)
  • charge 成功時、マッチした集合を refsdiscovery_type: auto)へ書き戻し

ドキュメント

ディレクトリ 内容
docs/spec/ CLI、evaluation、coverage(gobce 含む)、observability
docs/design/ architecture、評価モデル、未決事項、infra/manifest 設計
docs/overview.md ビジョン・Production Readiness Linker

Test plan

  • ./.tools/go/bin/go test ./...
  • make lint / pre-push(yamllint, markdownlint, go vet)
  • make readiness-check(ローカルに gobce が必要)
  • hado charge --manifest hado.yaml で coverage / observability の自動 charge が期待どおり動くこと
  • manifest に evidence.observability.monitor.discovery.datadog がある場合、Datadog 認証と pup で Monitor refs が同期されること
  • observability.slo_exists gate + SLO discovery 設定がある場合、SLO refs も同期されること
  • --datadog-discover / --coverage-module フラグが存在しないこと

keyskey and others added 9 commits May 29, 2026 00:24
Extend the module contract with ObservabilityRef so observability
modules can return lane-specific evidence without a generic refs field.

Co-authored-by: Cursor <cursoragent@cursor.com>
Implement hado-datadog-pup as a bundled module that lists Datadog
monitors via pup, matches discovery criteria, and returns
observability monitor refs through the module runner contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop internal/integration/datadog in favor of the pup-based module
wrapper and update Makefile to build the bundled executable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename normalized coverage values to Measurement and keep validation
in the coverage domain while modules emit values through that model.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add chargeflow orchestration for coverage and observability domains,
remove --datadog-discover from charge, and thin cmd/hado/charge down
to parse, execute, save, and print summary.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add an always-applied Cursor rule that keeps domain packages free of
adapter, module runner, and concrete provider dependencies.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document automatic Datadog monitor discovery via hado-datadog-pup,
chargeflow domain chargers, and the removal of --datadog-discover.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use observabilitycharge alongside coveragecharge so chargeflow domain
charger imports stay symmetric in cmd/hado/charge.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove --coverage-module and the coverage charger module override so
charge selects modules from evidence.coverage.module like observability
uses manifest discovery config.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keyskey keyskey self-assigned this May 28, 2026
keyskey and others added 4 commits May 29, 2026 01:19
Replace single-resource discovery with set sync: match all monitors
and SLOs via hado_tags, services (OR), and env, replace auto refs each
charge, and add slo.discover via pup. Split the datadog module into
monitor.go, slo.go, and discover.go; update manifest schema and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Split behavioral specs from design exploration docs, remove legacy stubs
and implementation-status, and update cross-links plus doc-sync guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Align the orchestration package name with the hado charge CLI phase and
update imports, docs, and Cursor rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keyskey keyskey merged commit abe4171 into main May 28, 2026
2 checks passed
@keyskey keyskey deleted the feat/module-runner-datadog branch May 28, 2026 17:34
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