Repository navigation
docs: add explicit raw-data access guard - #20
Merged
Merged
Conversation
The implementation prompt restricted label access and required approvals for demo/full-data runs, but never explicitly forbade the agent from directly inspecting raw patient-level records. Add an explicit guard that applies across all profiles, modes and stages, mirror it in the workflow docs and prompt builder, and assert it in the prompt builder tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
florian6973
marked this pull request as ready for review
November 12, 2026 04:10
florian6973
added a commit
that referenced
this pull request
Nov 24, 2026
* Prepare 0.4.0a6 release notes and publishing references Release the temporal-leakage conformance (#21), the process-group termination fix (#15) and the raw-data access guard (#20) so downstream algorithms can depend on them from PyPI instead of a git commit (PyPI rejects direct-URL dependencies). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJQdbHt5icm1CgFVHsHTNx * Compare future-blind predictions to a few ulps, not bit for bit On GitHub runners, test_future_blind_rerun_passes_causal_and_fails_leaky failed for the leak-free toy scorer: 1 of 400 keys moved by 5.55e-17 (one unit in the last place) with the same package versions that passed on main. Rewriting the future changes the row layout, and polars float kernels can round differently in the last bit on some CPUs. Use a relative tolerance of 1e-12 (absolute 1e-15): far below the ~1e-7 move of the smallest leak measured in #21, so leaks are still caught, while downstream algorithms are not failed for rounding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJQdbHt5icm1CgFVHsHTNx --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The implementation prompt limits label/prediction-key access and requires approval for demo/full-data runs, but it never explicitly tells the agent not to inspect raw patient-level data. This PR adds an explicit guard.
docs/implementation-prompt.md: newRAW-DATA ACCESS GUARDparagraph inside the copyable prompt template, covering all profiles, modes and stages. It forbids directly opening/reading/sampling/previewing/querying real patient records, raw MEDS event files or clinical tables. It also states that a data path, credentials, exploratory mode or an implementation request is not authorization. Local tests must use synthetic fixtures. Only an explicitly human-approved demo/full-data pipeline run may process real inputs, and even then raw rows must never be exposed in output, logs, reports, chat or commits.docs/workflow.md: short summary of the guard.docs/prompt-builder.md: hint shown under "Scope and constraints".docs/tests/prompt_builder.test.cjs: asserts that the guard appears in every rendered prompt variant.Testing
npm test: 9/9 pass (Node 24.20.0)🤖 Generated with Claude Code