Repository navigation
Conversation
…its own fact A comparison of two relation columns was keyed by the two relation names only, so `ends[bus0] == ends[bus1]` and `ends[bus0] != ends[bus2]` read one fact and were proved apart. The subject now carries both columns, in one order whichever side each is written on, and the witness names them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014p3aDQy61apM8MpgF8ipph
…olumns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014p3aDQy61apM8MpgF8ipph
Contributor
Author
Note The following content was generated by AI. This PR duplicates #951, which a second session opened for the same bug. #951 is now merged into #949's branch, so #949 carries the fix. The source changes are the same in both. #951 also widens the relation fuzz to three columns and adds a negated swap case. I am closing this PR; its branch stays. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The following content was generated by AI.
The case check now reads each pair of relation columns as its own fact.
ends[bus0] == ends[bus1]andends[bus0] != ends[bus2]are refused, and the witness names the columns. Stacked on #949.Method, gate output, alternatives
The change
_subject_ofbuilds the pair subject asSubject('relation_pair', name, other, (column, other_column)). The two(relation, column)sides are sorted first, soends[bus0] == ends[bus1]andends[bus1] != ends[bus0]stay one subject.Subject.__str__printsends[bus0] vs ends[bus1].nameandqualifierstill hold the two relation names, so_columns_offrom #949 reads them as before.Tests
tests/test_exclusivity.py:TestAPairOfColumns::test_two_pairs_of_columns_are_two_facts: the reproduction from the prompt. It failed on the fix(language): the case check reads a comparison on a relation as false where the relation has no row #949 head (ValueError: not enough values to unpack (expected 1, got 0), no refusal). It now asserts the witnesswhere ends[bus0] vs ends[bus1] is equal, ends[bus0] vs ends[bus2] is different.TestAPairOfColumns::test_one_pair_written_both_ways_is_one_fact: one pair with its sides swapped is proved apart. It passes on the broken tree too, because there every pair was one subject. It guards the sort.test_a_row_both_cases_read_is_still_found[a-column-value-says-the-row-exists](ends vs endsbecameends[bus0] vs ends[bus1]), and the pair subject that the relation fuzz builds by hand.tests/test_validation.pyasserts no pair witness text, and no docs page prints one.Guard table
I deleted each guard, ran
pixi run pytest tests/, and restored the file.test_one_pair_written_both_ways_is_one_fact)('', ''))test_two_pairs_of_columns_are_two_facts)Gates
pixi run lintpassed.pixi run ci:lintpassed,testpassed (3076 passed, 1 skipped),docs-buildpassed.compile-texfailed because tectonic could not download its bundle from this container (relay.fullyjustified.net), the same as on #949. This diff does not touch the typesetter. CI will run it.Base branch
This PR targets the #949 branch (
claude/modest-fermat-dif3dq), notmain, because the fix must keep_columns_offrom #949 working. AGENTS.md says to branch fromorigin/main. I departed from that because this PR depends on #949. When #949 merges, retarget this PR tomain.Not done
b0 == b1,b1 == b2,b0 != b2) stay independent. That over-approximates and is safe. Out of scope, as the prompt says.TestSoundnessstill walks a two-columnends. A third column there would have caught this defect. I did not widen it.Generated by Claude Code