Skip to content

Commit 97cb993

Browse files
mxaminclaude
andcommitted
Drop the source-level shadow audit (#356)
The scan enforced the shadow invariants by pattern-matching src/*.c, which made it a parser of C that it never was: a comment or literal read as code until the previous commit, and any body it failed to delimit was attributed to its neighbour. The invariants stay — developer.md now states them as a review rule, with the grep that lists every raw crossing — but they are no longer asserted by the test suite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 302c851 commit 97cb993

2 files changed

Lines changed: 4 additions & 205 deletions

File tree

developer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ Rules every call site must keep:
9494
in between (the `Py_*_ALLOW_THREADS` pair is fine — the call is pure C);
9595
- call exactly one End function after a successful Begin.
9696

97-
**Invariant, enforced by `tests/test_shadow_audit.py`:** every C function that
98-
accepts an lxml element (`PyXmlSec_LxmlElementConverter`) either calls a
97+
**Invariant, to check by review:** every C function that accepts an lxml
98+
element (`PyXmlSec_LxmlElementConverter`) either calls a
9999
`PyXmlSec_LxmlShadowBegin*` helper or is one of the four dual-body functions
100100
(`register_id`, `add_ids`, `encrypt_xml`, `decrypt`), which must consult
101101
`IsActive()` before touching a raw node; and `->_c_node` / `->_c_doc` appear
102-
only in those four and in the helpers' fast-path branches. The test scans
103-
`src/*.c`, so a raw access anywhere else fails the suite on both paths.
102+
only in those four and in the helpers' fast-path branches. A quick
103+
`grep -n '\->_c_\(node\|doc\)' src/*.c` lists every crossing to check.
104104

105105
## How the reflection works
106106

tests/test_shadow_audit.py

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)