Skip to content

fix(todo): preserve zero monitor generation metadata - #4199

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
BigDataDZ:codex/pr-4187-zero-generation-metadata
Sep 11, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
BigDataDZ:codex/pr-4187-zero-generation-metadata

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Summary

  • preserve the valid numeric value 0 for material_change_generation when rendering Todo Markdown metadata
  • reuse the existing generation normalizer instead of treating this field like other truthy-only monitor metadata
  • add a regression assertion for zero-generation metadata round trips

Why

PR #4187 adds production-scale Monitor fixtures whose generations include 0. The Markdown formatter previously dropped those zero values, so rebuilding the Todo projection produced 22 records with an absent generation and failed the parse/render parity check.

This patch fixes that latent contract bug. PR #4187 should also update to the latest main, which already includes #4186 and resolves its separate Lark maintainability-ratchet failure.

Validation

  • tests/control_plane/test_todo_metadata_schema.py and tests/control_plane/test_todo_projection_recovery.py: 30 passed
  • tests/control_plane/test_todo_external_wait.py: 8 passed
  • maintainability ratchet plus metadata schema: 17 passed
  • loopx check on the changed source and test: 0 errors, 0 warnings
  • integration check using PR feat(monitor): atomically commit native observations and successors #4187 + latest main + this commit: both previously failing Python tests passed
  • risk-based premerge: 16/17 selected canaries passed; the remaining todo-deferred-capacity-cli-smoke.py failure is an unchanged current-main error-message wording mismatch outside this patch

Signed-off-by: BigDataDZ 76271875+BigDataDZ@users.noreply.github.com

Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
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.

2 participants