feat(assessment): find the attempt behind a leaked task text
This commit is contained in:
1 parent
bb917bf62e
commit
5a731c25b7
26 files changed
+2500
No files matched your search
@@ -445,6 +445,23 @@ make -C backend assessment-review ARGS='inspect --attempt <uuid> --actor operato
|
||||
- To use thresholds other than the demo values, publish a policy version with an `assessment.signals` section through the policy publisher. `DemoProductPolicyV3` is the demo example and is published only explicitly (the isolated browser fixture does so); the startup seed publishes version 1 only. Attempts that already started keep the version they started with. The demo duplicate thresholds assume a population: a copied pair is flagged only from about 26 answers per family (attention) and 61 (review) at 13 items, or 9 and 14 at 23 items. To try the feature on a smaller stand, publish a policy version with lower `duplicate_bits_attention` and `duplicate_bits_review` (the integration tests use 4 and 6); do not edit the demo policy. A review is a point-in-time evaluation, run again by the job at the deadline. The job logs one line per run with the number of reviews and its duration (`assessment review job finished`).
|
||||
- The rows hold counts, durations, and keyed digests (HMAC-SHA-256 under keys derived from `IDENTITY_KEY_SECRET`, each with a key version) and no answer text. Rotating the secret keeps the stored rows but makes new fingerprints incomparable with old ones. Deleting an account deletes its attempts and, by cascade, their facts and reviews; the audit rows keep only the attempt ID and the handle. The digests are kept for the lifetime of the attempt; no retention period is defined yet.
|
||||
|
||||
## Leak trace
|
||||
|
||||
An operator finds the attempt behind a leaked task text with a local command (see [ARCHITECTURE.md](ARCHITECTURE.md#leak-trace) for how it decides). It takes text; a screenshot has to be read by an OCR tool first, which is not part of this project:
|
||||
|
||||
```sh
|
||||
make -C backend assessment-leak-trace ARGS='search --actor operator:<handle> --file leaked.txt'
|
||||
pbpaste | make -C backend assessment-leak-trace ARGS='search --actor operator:<handle> --stdin'
|
||||
make -C backend assessment-leak-trace ARGS='search --actor operator:<handle> --code 7K3QD-9XM2T'
|
||||
```
|
||||
|
||||
- The command needs `DATABASE_URL` and `IDENTITY_KEY_SECRET`, and reads nothing else from the environment or a dotenv file. The secret must be the one of the server that served the attempts: the codes and marks are computed from it, so a different secret finds nothing, and the command refuses an unset, placeholder, or short secret and never prints it. `make -C backend assessment-leak-trace-build` builds `backend/bin/assessment-leak-trace`.
|
||||
- Put the text in a file or on standard input, not in a command-line argument, so that it stays out of the shell history and the process list. The text is at most 64 KiB of UTF-8; a longer one is refused, and a document can be searched in pieces. `--code` takes a visible code that was read from a screenshot by eye, with or without the hyphen and in either case.
|
||||
- It prints the search ID, `found`, `ambiguous`, or `not_found`, and for a found search the method (`invisible_mark`, `visible_code`, `wording`, or `variant`), the attempt ID, and the strength in bits, with notes that never quote the text. `not_found` is a normal outcome, not an error: the data was not enough to name an attempt.
|
||||
- Every search is recorded in `assessment_leak_traces` (operator handle, database time, a keyed digest and the length of the text, the outcome, the method, the attempt of a found search, and counts) before a result is printed, whatever it finds. The table refuses UPDATE, DELETE, and TRUNCATE, keeps no text, and outlives the attempt it names. The handle is an audit label, not authentication: any holder of the database credential can type any handle. Rolling migration 51 back is refused while the audit holds a row.
|
||||
- The result goes to the operator only. No HTTP operation serves it, an employer never sees it, and it changes no score, category, or quota. It is a hint for a manual review and an appeal, not a decision.
|
||||
- The command reads every real attempt to compute its code and searches the stored statements, so it is meant for an operator and not for a request path; its cost grows linearly with the number of attempts.
|
||||
|
||||
## Demonstration categories on a stand
|
||||
|
||||
A category from a `demo_basic` result is assigned only on an isolated synthetic stand. It is not calibrated and must not appear in an environment with real candidates. Two independent steps enable it on a stand:
|
||||
|
||||
Reference in new issue
Block a user