Repository navigation
Conversation
Who: Admins and CI jobs that store or rotate organization secrets. What: New store_organization_secret with local checks and name confirmation. set_/put_organization_secret keep their behavior and only gain redacted problem text and detached errors. Where: proofline/client.py, proofline/_transport.py, regenerated operations.py, scripts/contracts.py, README.md, tests/test_secrets.py. When: On every secret write and every problem it returns. Why: A problem that echoed the value reached ProoflineError.detail, and errors kept chains and frames that could hold the request body. How verified: pytest 352 passed, 0 failed, 0 errors (before: 237 passed, 1 known Windows failure); ruff, mypy, contracts, generate pass.
This branch has not been deployed
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.
Who it helps
Organization admins and CI jobs that store or rotate secrets (
org:configure). Today a problem that repeats the value lands inProoflineError.detail, and a raised error can keep a chained exception or httpx frames that hold the JSON body.What it does
store_organization_secret(both clients) checks the organization ID, the name (an ASCII letter, then up to 63 letters, digits,_or-) and the value (1 to 32,768 UTF-8 bytes) before any request, and accepts a result only if the server confirms the same name.set_organization_secretandput_organization_secretkeep their behavior: same arguments, same request, server-side checks, any 200 accepted, sameProoflineErrortypes. They gain only redacted problem text and detached errors.[redacted]in every problem field, including typed configuration problems.ProoflineErrorwith no chained exception and no HTTP-layer frames, and send the write once.Decisions
to_dict()yields and skip redaction otherwise. Rejected: moving them onto the new checks, which would turn server errors into localValueErrors for existing callers.str.replace, which can match inside an earlier[redacted].strorSecretValuecan still show in the caller's frames, so the README says to passSecretStr.How verified
The new tests pin the legacy call shape (
org_id=,name=, keyword-onlybody=) and check that invalid legacy input still reaches the server and comes back asProoflineError. They fail when the redaction, the repr form or the traceback detaching is removed.scripts/check.pywas not run because it downloads uv and the pinned packages.