[Architecture]: two modules both claim to own "private-looking text"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, typescript
Direzione di ricerca
Read loopx/public_safe_text.py, loopx/control_plane/runtime/public_safety.py, and the caller in control_plane/goals/artifact_lifecycle.py; compare their rules with tests/fixtures/public_safe_text_corpus.json and the TypeScript mirror. First resolve which policy should own the differing verdicts and thresholds. Done means one named owner, no caller OR-ing two owners, and corpus coverage for both sides of the table and the path cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem / 问题
Two modules each document themselves as the canonical answer to "is this text private?", and
neither dominates the other.
loopx/public_safe_text.pyopens with "Canonical private-looking-text rules for public-safe
control-plane fields", explains that its rule set "used to be copied into each owner, and the
copies drifted", and namestests/fixtures/public_safe_text_corpus.jsonas the corpus pinning
the Python and TypeScript owners to one contract. Consumers:feedback,authority,
boundary_authority,control_plane/goals/artifact_lifecycle.loopx/control_plane/runtime/public_safety.pycarries an independent
SECRET_LIKE_SURFACE_PATTERN+LOCAL_PATH_SURFACE_PATTERN, used by
validate_public_safe_value— the guard on the busiest public-output path (12 production
modules call it). It never consultspublic_safe_text.
Measured on b15413ffc, calling both owners' matchers directly. A HIT means the text is treated
as private; no row is a HIT in both columns:
| value | public_safe_text |
public_safety |
|---|---|---|
ghp_… (36 filler chars) |
— | HIT |
eyJ….….… (JWT shape) |
— | HIT |
access_key=… |
— | HIT |
C:\Users\bob\x |
— | HIT |
the bare word Bearer / password / secret |
HIT | — |
the Bearer token expired |
HIT | — |
token=x (short value) |
HIT | — |
larkoffice…, docs.internal… |
HIT | — |
Authorization: Basic <base64> |
HIT | — |
see file:///Users/alice/goal.md |
HIT | — |
path:/Users/alice/goal.md |
HIT | — |
The consequence is visible in the code that sits between them: on main,
control_plane/goals/artifact_lifecycle.py writes
if find_private_text_match(value) or _TOKEN_SHAPES.search(value), where _TOKEN_SHAPES is a
private list of provider prefixes carrying this comment: "Provider token shapes the shared
private-text rules do not cover … a leaked token there must never reach a public projection just
because the shared corpus did not list its prefix." That caller knows it needs two owners and
patched the gap locally. #5135 folds _TOKEN_SHAPES and five sibling copies into the
public_safety owner, which removes six copies but still leaves that caller OR-ing
public_safe_text with public_safety, because the prefixes are not the only thing the two corpora
disagree about.
Why this needs an owner decision rather than a merge
The two corpora encode different philosophies, and neither is obviously wrong for all surfaces.
public_safe_text rejects ordinary English words (Bearer, password, secret) — its docstring
records that it deliberately moved one rule away from the bare word because governance prose says
"owner authorization" constantly, while other rules stayed word-shaped. public_safety instead
requires an assignment shape with a length floor so that "the token budget is 1200" survives.
Picking either winner changes what the other set of surfaces is allowed to publish, and it will move
expectations in tests/fixtures/public_safe_text_corpus.json and the TypeScript mirror. There is
also a prefix-blindness dimension to settle: public_safety's path rule excludes a preceding : or
/, which is why file:///Users/alice/goal.md and path:/Users/alice/goal.md pass it while
public_safe_text catches them.
Desired outcome / 期望
One module owns "private-looking text". The other is deleted, or becomes a policy layer that only
adds per-surface thresholds and words on top of the shared shapes. No caller should have to consult
two owners for one value.
Acceptance / 验收
- A single named owner for private-text detection, whose docstring states which rules are
word-shaped and which are shape-with-threshold, and why. artifact_lifecycleno longer ORs two owners for one value.- The shared corpus fixture pins both directions of the table above, so a future consolidation
cannot silently drop a rule that only one side had. file:///Users/…andpath:/Users/…are either rejected by the surviving owner or recorded as
accepted, with the reason.feedback/authority/boundary_authorityandvalidate_public_safe_valueare shown to
reach the same verdicts on a named subset, or each surface's deliberate difference is written
down next to the owner.
- Lingua principale
- Python
- Stelle
- 6.2k
- Fork
- 596
- Merge medio
- 7h 47m
- PR unite (30g)
- 904
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di loopx-project/loopx
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
loopx-project/loopx#6842 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
loopx-project/loopx#6108 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
loopx-project/loopx#5688 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
loopx-project/loopx#5632 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
loopx-project/loopx#5443 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di loopx-project/loopx
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
[Bug]: Queen's own Ollama model loses num_ctx when a running session switches to itForse già presa @anasamin26 l’ha presa oggi. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aden-hive/hive#7508 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BerriAI/litellm#47884 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug 🐛
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
netalertx/NetAlertX#1856 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno