Skip to content

Skipped only the bad entry when CMDB data contains a variable reference - #59

Closed
djbclark wants to merge 1 commit into
fix/cmdb-name-offending-key-r2from
fix/cmdb-one-bad-entry-skips-only-that-entry-r2
Closed

djbclark wants to merge 1 commit into
fix/cmdb-name-offending-key-r2from
fix/cmdb-one-bad-entry-skips-only-that-entry-r2

Conversation

@djbclark

@djbclark djbclark commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Skipped only the bad entry when CMDB data contains a variable reference

One entry holding an unresolved variable reference rejected the whole vars, variables or classes section. Now only that entry is rejected (and named); the others are installed, as for the other per-entry problems in this file. This relaxes the fail-closed behaviour of the existing check, so it needs a maintainer's judgment. Stacked on #57.

Fixes #9

Tests: new acceptance test 16-variable-references-good-entry-survives pass on macOS (06_host_specific_data: 39 pass, 0 fail, 1 soft fail); Linux --enable-debug gate on this head: unit check 78/78, 29_simulate_mode 7/7 (the new acceptance test ran on macOS only).
Adversary review (omp Claude Opus, read-only): APPROVE. P2 (design): a host can now end up with a mixed CMDB state that its author did not intend; the only existing upstream test of this (10-variable-references.cf) cannot detect the change. P3: the section-level Failed to load CMDB data line no longer appears when entries are skipped.

AI-assisted; reviewed by djbclark only at the level of this fork PR.

🤖 Generated with Claude Code

CheckCMDBDataForUnexpandedVars() rejected a whole 'vars'/'variables'/
'classes' section on the first entry containing an unresolved variable
reference, discarding every other entry in that section along with it.
Checked per entry instead, inside each section's own install loop,
matching this file's existing skip-and-continue idiom for other
per-entry problems (an invalid variable specification, a missing
'value' field).

New acceptance test: one good and one bad entry in the same 'vars'
section, asserting the bad entry is still rejected and named, and the
good entry is installed anyway. Discrimination proved: fails on the
unpatched function, passes with the fix; full 00_basics/06 suite still
14/14.

Changelog: Title
Ticket: CFE-4720
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T01:58:18.861617Z a857242 PR opened
🔒 Security Review ✅ Completed 2026-11-01T01:59:41.381620Z a857242 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@djbclark

djbclark commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Linux gate backfill (Ubuntu 24.04 aarch64 container, root, --enable-debug) on head a85724238:

  • unit check: 78/78 pass
  • simulate_mode_test: 5/5; acceptance 29_simulate_mode: 7/7 pass
  • own dir acceptance 00_basics/06_host_specific_data: 14/14 pass (incl. new tests 12, 15, 16)

No failures, no soft failures.

@djbclark

Copy link
Copy Markdown
Owner Author

Closing as superseded: retired under djbclark's ruling of 2026-11-14 (B-5b "Replace").

The fork's CMDB loader is now all-or-nothing: a file with any invalid entry installs nothing (R13, 2026-11-02). That landed in the cmdb-fail-closed series, finished in #98, and is merged into tendcf-integration at 6505f48. Skipping only the bad entry goes the opposite way, so this change will not be offered upstream. The branch is kept, not deleted.

@djbclark djbclark closed this Nov 14, 2026
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