Skip to content

Merge the duplicate decision_log keys in the bridge YAML - #109

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/merge-database-decision-log
Oct 24, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
claude/merge-database-decision-log

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Follow-up to #107.

The problem

Three bridge entries each had two decision_log: keys. YAML keeps the last of two equal keys and drops the first without any warning, so the first block never reached the parsed entry:

Entry File Notes that were being dropped
database did_matlab_python_bridge.yaml DID-matlab#229, 0de9cf2, #233, and the #235 merge into the #233 branch
sqlitedb did_matlab_python_bridge_implementations.yaml the #229 port onward (index names, fast id/isa searches, …)
binaryTable did_matlab_python_bridge_file.yaml the 2026-09-08 sync (DID-python#66) onward

The checks never noticed, because every one of them reads the parsed YAML, where the lost block leaves no trace.

What changes

  • One decision_log per entry. It sits where the first key was and holds both blocks: the older block first, then the newer notes. For database, the #237 note from Pin the negation of '~or' in SQLite search (DID-matlab#237) #107 stays last. No note text changed. Comparing the files line by line against main, the only line removed in each is the extra decision_log: >.
  • New guard: TestNoEntryWritesAKeyTwice in tests/test_bridge_contract.py. It loads every bridge file with a SafeLoader subclass that reports any key written twice in one mapping, so this can't come back unnoticed. It also has a hand-built case to show the guard catches one. On main it reports exactly the three entries above; on this branch it reports none.

No matlab_last_sync_hash changes.

Checks run locally

  • black --check src tests: clean
  • ruff check src tests: clean
  • pytest: 847 passed, 10 skipped, 1 xfailed
  • bin/check_bridge_coverage.py --check file/hash/status/drift/member/missing against DID-matlab main: 0 problems each

Generated by Claude Code

The database, sqlitedb and binaryTable entries each had two decision_log
keys. YAML keeps the last, so the first block of each -- the notes on
porting DID-matlab#229, #233 and #235, among others -- was silently dropped
from the parsed entry. Each entry now has one decision_log holding both
blocks, older notes first; no note text is changed.

test_bridge_contract gains TestNoEntryWritesAKeyTwice, which loads every
bridge file with a loader that reports a key written twice in one mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012MroTijyNKsCMqFHpXFbpc
@stevevanhooser
stevevanhooser merged commit d7cf938 into main Oct 24, 2026
7 checks passed
@stevevanhooser
stevevanhooser deleted the claude/merge-database-decision-log branch October 24, 2026 20:59
stevevanhooser pushed a commit that referenced this pull request Oct 24, 2026
…er-quoting

#109 merged the database entry's two decision_log keys into one. The #236
note and the 2c08472c merge note move to the end of that merged block;
matlab_last_sync_hash stays 2c08472c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7XsYS2DKSy2ucFzEEWR3D
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