Scan tool-authored casefile statements in the language check - #11
Conversation
CI only gated memos and templates, so a hand-edited finding statement or verdict rationale could carry banned vocabulary in a committed casefile. Parse casefile.json and scan those fields; leave claim texts and media titles out. Co-authored-by: Cursor <cursoragent@cursor.com>
|
| Filename | Overview |
|---|---|
| scripts/check_language.py | Adds casefile target discovery, selective extraction of tool-authored fields, evidence-backed identity exemptions, and malformed-JSON failure handling. |
| tests/test_language.py | Adds broad casefile-scan coverage, but changed test descriptions use person-like names contrary to the repository’s description/comment policy. |
| src/coldscreen/language.py | Updates shared language-policy documentation to distinguish memo claim exemptions from casefile field scanning. |
| DECISIONS.md | Records the selected casefile fields, exemption behavior, excluded quoted inputs, and failure policy. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Language-check target] --> B{casefile.json?}
B -- No --> C[Scan memo or template text]
B -- Yes --> D[Parse JSON]
D --> E{Readable and valid JSON?}
E -- No --> F[Fail language check]
E -- Yes --> G[Extract selected tool-authored fields]
G --> H[Verify identity exemptions against registry evidence]
H --> I[Scan each field for banned terms]
C --> J{Banned term found?}
I --> J
J -- Yes --> F
J -- No --> K[Pass target]
Prompt To Fix All With AI
### Issue 1
tests/test_language.py:589-590
**Remove names from test descriptions**
The changed docstrings include person-like full names despite the repository rule prohibiting personally identifiable information in descriptions and comments. Replace these references, including the adjacent identity-test description, with explicitly synthetic placeholders.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Scan tool-authored casefile statements i..." | Re-trigger Greptile
| """A finding statement that names CROOK, Cuthbert passes only when | ||
| sibling registry evidence carries that name.""" |
There was a problem hiding this comment.
Remove names from test descriptions
The changed docstrings include person-like full names despite the repository rule prohibiting personally identifiable information in descriptions and comments. Replace these references, including the adjacent identity-test description, with explicitly synthetic placeholders.
Rule Used: Make sure no personally identifiable information i... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_language.py
Line: 589-590
Comment:
**Remove names from test descriptions**
The changed docstrings include person-like full names despite the repository rule prohibiting personally identifiable information in descriptions and comments. Replace these references, including the adjacent identity-test description, with explicitly synthetic placeholders.
**Rule Used:** Make sure no personally identifiable information i... ([source](https://app.greptile.com/900-labs/-/custom-context?memory=930389e5-d152-4d6b-9814-6e9c4f9b209c))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
casefile.jsonand scans tool-authored fields (finding statements, record notes, rationale, questions, narrative, enforcement notes, skipped reasons).Test plan