English | 日本語
Sieve Tray v2.5.1
A general-purpose observation tool — a desktop front-end for the Sieve series
Combines Sieve Lens's answer to the question "does this document contain something AI can read but a human can't see?" — Lens surfaces what is invisible, with its location, so a human can decide what to do — together with Sieve Scope's code similarity detection, and Sieve Referee's text paraphrase detection — plus, new in v0.8.0, Sieve Referee's quantifier audit lane — into a single desktop app. It also bundles Sieve Redact, the masking engine behind the text/image Sanitize actions, and — new in v0.10.0 — Sieve Crowd, the table anonymization engine behind the Anonymize Tables page. The Anonymize Tables page also carries a one-click table observation (
scan): Crowd's single-page HTML report of how the table currently looks — roles, groups and hidden-character findings, never cell values — opened straight in your browser. Point it at a folder of submissions and it detects and reports, in one pass, documents containing invisible content or hidden prompts, code pairs with suspicious structural similarity, text pairs that look paraphrased or reused, and sentences that make ungrounded universal claims (hallucination candidates). The Cohort tab compares the submissions of a folder against each other and writes a privacy-checked sharing record (handoff/); the full report stays on your machine.
💡 Concept
Sieve Lens answers "does this document contain something AI can read but a human can't see?". Sieve Scope answers "do these two source files share suspiciously similar logic, beyond coincidence?". Sieve Referee answers "does this text say the same thing as that one, just reworded?". Sieve Redact handles "hide exactly the regions you chose, and prove nothing else changed". Sieve Crowd handles "share this table without exposing the individuals in it". All five are zero-dependency, deterministic engines in the Sieve series — but checking a folder of submissions by hand meant running separate tools and cross-referencing the output yourself.
Sieve Tray removes that step. Point it at a directory containing one
subfolder per submission, and it automatically routes each file to the right
engine: documents go to Sieve Lens, .py files go to Sieve Scope's pairwise
comparison, and plain-text files (.txt/.md) additionally go to Sieve
Referee's pairwise paraphrase comparison and Sieve Referee's quantifier
audit lane (new in v0.8.0, powered by Sieve Referee >=1.3.0). Results land in
a single window, with local history so nothing has to be re-run, and a detail
view showing exactly which observation axis fired and why — never a bare
verdict, only what the underlying engines actually observed. The Anonymize Tables
page additionally puts Sieve Crowd one click away for table files, and the
Sanitize actions put Sieve Redact behind the text and image editors.
Like the rest of the Sieve series, this is an observation tool, not a judgment tool. A flagged item means "this deserves a human look", not "this is confirmed misconduct".
🚪 Gate (Export for Sharing)
Pick a folder, and Gate gets it ready to hand to an AI or to other people.
- Extracts only the text that is visible in each document
- Replaces personal information such as names and email addresses with
[REDACTED]1,[REDACTED]2, … - Checks for prompts aimed at an AI hidden in invisible text (text in the same color as the background, for example)
PDFs are checked for five kinds of invisible text: characters the page never paints (render modes 3 and 7), characters a text-recognition layer rides invisibly on top of (as in a scanned PDF), text too small to read, text drawn outside the page, text on a hidden layer, and white text with no background. White text standing on a painted rectangle stays visible and reaches the output — the background is judged, not assumed.
Output is split into two folders:
handoff/— files that are ready to hand onlocal/— files you keep (the detailed report)
handoff/ also holds a receipt (gate-receipt.json). It contains only counts and checksums — no text, no names. Run verify later to confirm the files you handed over are exactly what was exported.
python3 sieve_tray.py gate <input-folder> -o <output-folder>
python3 sieve_tray.py verify <output-folder>/handoff/gate-receipt.json
👥 Cohort (Compare Submissions)
Cohort compares every submission in a folder against every other and finds pairs that look alike.
- Text files (.txt, .md) — compare the text
- Word and PDF files (.docx, .pdf) — check for hidden text (not compared with each other)
- Python — finds the same structure even when variable names were changed
- Other programming languages — compared with a common method (a small file contained whole inside a larger one is found too)
As with Gate, output goes to handoff/ (the receipt only) and local/ (the comparison report). The report lists the similar pairs and where they overlap (from which character to which character). A similar pair is a candidate to check, not a verdict of misconduct.
If every submission shares some material, such as an assignment text or a template, name it as the base document and it is left out of the overlap.
python3 sieve_tray.py cohort <input-folder> -o <output-folder>
python3 sieve_tray.py verify <output-folder>/handoff/cohort-receipt.json
If file names contain people's names, add --no-paths. The receipt then identifies files by sequence number.
Details on the receipt vocabulary and how overlap is counted: docs/receipt-reference.md.
📋 File List and Check Code
Write the contents of a folder out as one table, so it can be checked later. Each entry carries its checksum and size, and the whole folder gets a folder checksum. With --key-file a check code is added, and checking it requires the same key file.
- Run it on the folder (
--againstfor a diff,--key-filefor the check code) - Hand over the receipt in
handoff/; keeplocal/for yourself - The receiver runs
verifyto confirm the match
python3 sieve_tray.py manifest <input-folder> -o <output-folder>
python3 sieve_tray.py manifest <A> --against <B> -o <output-folder>
python3 sieve_tray.py verify <output-folder>/handoff/manifest-receipt.json
Details of the receipt shape and the check code rules: docs/manifest-format.md.
🧹 Rename
Build a plan that tidies file names by a fixed rule, check it, then apply it. The original folder is untouched; applying creates a renamed copy.
- Run it with
--patternand read the plan - When the plan looks right, add
--applyto build the copy - If the names carry people's names, add
--no-paths(the receipt identifies items by sequence number)
python3 sieve_tray.py rename <input-folder> --pattern '{stem}_{seq:3}{ext}' -o <output-folder>
python3 sieve_tray.py rename <input-folder> --pattern '{stem}_{seq:3}{ext}' --apply -o <output-folder>
The rule fields are {seq}, {stem}, {ext}, {hash8} and {parent} ({seq:3} sets the digit width); name collisions are listed before anything runs. Details: docs/rename-procedure.md.
🎲 Draw
Draw lots over a roster with a public seed, so anyone can produce the same result. The order comes from the seed and the groups are dealt round-robin.
- Prepare a roster (one item per line)
- Give
--seeda string, then pick--groupsor--size - The result lands in
local/and the receipt inhandoff/(the receipt carries no names)
python3 sieve_tray.py draw <roster> --seed <string> --groups 3 -o <output-folder>
The procedure and how to re-check it by hand: docs/draw-procedure.md.
🧼 Clean Metadata
Strip the metadata from PDF, JPEG, PNG and Office files before sharing them; the pages, the pictures and the documents themselves stay unchanged.
- Pick the folder (or a single file) and the output folder
- The cleaned copies land in
handoff/, next to the record - The report in
local/shows the removed values (the record carries only counts)
python3 sieve_tray.py clean <input-folder> -o <output-folder>
What is removed and what stays, per format: docs/clean-metadata.md.
🧽 Normalize
Turn text, JSON and CSV files into UTF-8 with even line endings; JSON keys are sorted and CSV cells keep their values. The character code is never guessed.
- Pick the input and the output folder
- A file that is not UTF-8 needs its code named (
--from-encoding cp932); without the name it is refused, with the strictly readable candidates --checkwrites the record only (no copies)
python3 sieve_tray.py normalize <input> -o <output-folder> [--from-encoding cp932]
The rules and the JSON / CSV styles: docs/normalize-format.md.
📊 Compare Tables
Compare two CSV tables by the key columns and see what was added, changed, removed, or duplicated.
- Pick table A, table B, and the key columns (
--key idor--key id,region) - The record in
handoff/carries the counts only; the row detail goes to the report inlocal/ - A key column missing from either table refuses (exit code 2)
python3 sieve_tray.py table-diff <A.csv> <B.csv> --key id -o <output-folder>
The states and the record: docs/table-diff.md.
🧩 The Sieve Series
Sieve is a family of deterministic, zero-dependency engines that share the same design principles (deterministic output, no telemetry, fully local) — each engine observes or treats one specific risk, and they compose:
| Package | Role | Connects to |
|---|---|---|
| sieve-core-engine | Deterministic structure aggregation & confidence scoring — the base engine of the ecosystem | — |
| sieve-lens | Observes invisible content & hidden prompts in documents | → redact via --from-lens, → tray |
| sieve-scope | Observes structural similarity between source files | → tray |
| sieve-referee | Screens text structure, reuse, and paraphrase | → tray |
| sieve-redact | Deterministic masking of chosen regions with change records & completeness verification | ← lens, → tray |
| sieve-order | Observes prompt surface structure in a 6-bit observation space and issues receipts | — |
| sieve-crowd | Anonymizes table data with deterministic math transforms | → tray |
| sieve-tray | Local front-end that unifies the engines | ← all engines |
Observation → masking in one pass: Lens finds what a human can't see, Redact removes it with a receipt that proves nothing else changed.
🔥 Key Features
- One folder in, everything checked — routes
.pyfiles to Sieve Scope, plain-text files (.txt,.md) additionally to Sieve Referee (both pairwise paraphrase comparison and the quantifier audit lane), and all documents (including.html,.docx,.pdf, images) to Sieve Lens, automatically, by extension. - Background-threaded GUI — scanning never freezes the window, even on large submission sets.
- Table observation (
scan) & three-stage unobserved colors — pick one CSV/Excel file and read Crowd's one-page HTML view of the current table in your browser; rows Tray could not observe are grouped into three readable stages in the app and the HTML report (amber = fixable on the file side, gray = engine-side gap, faint gray = out of scope by design), with the reason text always shown alongside the color. - English and Japanese UI — switch languages from the Settings dialog (English by default). Note: Sieve Referee's own explanation text for a flagged text pair is generated in Japanese regardless of UI language, since the engine's calibration is Japanese-specific; the detail dialog shows it labeled as such.
- Sortable, filterable results — click any column to sort; filter documents by filename and/or "flagged only"; filter code/text pairs by filename.
- Detail dialog — double-click any row to see the per-axis observation states and the underlying evidence/scores/reason the engine recorded, not just the mask string.
- Detect Universal Statements (new in v0.8.0) — every scanned
.txt/.mdfile is also passed through Sieve Referee's quantifier audit lane, which flags sentences that make universal claims without backing (theorem/enumerated/sample) — the kind of "all X are Y" claim that, with no proof or finite enumeration behind it, is a hallucination candidate. Flagged sentences surface in their own Detect Universal Statements page, one row per sentence, with the signal (RED = unbacked universal, YELLOW = sample-only or unbacked measured), the matched patterns, and a separate Certainty Markers section in the detail dialog showing any epistemic certainty markers (e.g. 「明白に」「例外なく」) co-occurring in the sentence. The lane ships with a bundled default modifier-vocab file; users can override the path from Settings to swap in a custom vocabulary. - Local history — every scan and anonymization run is saved to a
local SQLite database
(
~/.sieve_tray/history.db); revisit a past run without re-scanning. - Configurable — default export folder, history retention, UI language, and the audit lane's modifier-vocab file (empty = bundled default) are all adjustable from a Settings dialog.
- File or folder selection (new in v0.9.0) — point Sieve Tray at a whole folder (the original mode) or pick individual files; the audit lane runs on a single document, so file-selection mode is a natural fit for quick one-off checks.
- Self-contained report export (HTML or Markdown) — every result can be exported as a standalone HTML report, or as a Markdown report for plain-text / version-controlled workflows.
- History clear (new in v0.9.0) — the History and Masking History pages each have a "Clear History" button for when you want to wipe the local SQLite store.
- Improved signal colors (new in v0.9.0) — RED and YELLOW rows have stronger pastel backgrounds and the signal column is rendered in a signal-colored foreground, so flagged rows are easy to spot at a glance even on calibrated monitors.
- Sanitize text files — run the bundled Sieve Redact engine over the
selected folder's
.txt/.mdfiles with a rules file of your choice; every output gets a machine-readable receipt, and the summary always reports the masked item count and the byte-integrity verification. - Sanitize an image — drag rectangles on a PNG (8-bit RGB/RGBA) in the region editor, preview the real engine output in place, and save a reusable region config; every output gets a machine-readable receipt (pixel integrity is verified; byte integrity is not applicable to PNG re-encoding).
- Sanitize a folder of images — apply one region config to every PNG
(8-bit RGB/RGBA) in the folder. The config kind routes the run:
region-only configs target PNGs, rule/builtin configs target
.txt/.md, and files that don't match are reported as excluded (never as failures). A config mixing both kinds is rejected up front with nothing processed. Every output gets a machine-readable receipt. - Safer images, wider phone coverage (new in v1.3.0) — the bundled
Sieve Redact is 0.10.0: images beyond the engine's pixel limit are
refused up front with a readable message instead of being processed,
and phone numbers written with a full-width or half-width katakana
long-vowel mark (
090ー1234ー5678/090ー1234ー5678) are observed and masked exactly like their hyphenated twin. - Engine skips surface as unobserved (new in v1.3.0) — when an engine reports that it could not observe a file, Tray lists it under "unobserved" with the engine's own reason, so a gap in the analysis is never presented as a clean result.
- Anonymize Tables (new in v0.10.0) — the Anonymize Tables page sends a
table file (
.csv/.json/.xml) to the bundled Sieve Crowd engine: inspect columns (distinct counts, unique ratios, suggested roles), dry-run the transform to compare before/after alone-row counts, generate a pseudonym key, and run deterministic anonymization with a machine-readable receipt (records in/out, suppressed count, k achieved, status). Protection is k-anonymity against an outsider who knows the declared quasi-identifiers; if the requested k is not achievable, the engine refuses without writing an output file. Every run is saved to the local history database and included in exported reports. The page also keeps an 8-column run history view (latest 20 runs, refreshed at startup and after each run; new in v1.0.0). - CP932 and Excel input (new in v1.3.0) — the Anonymize Tables page reads
CP932 (Windows-31J) CSVs and Excel
.xlsxworkbooks through the same engine, with the character code auto-detected (a UTF-8 BOM, then strict UTF-8, then strict CP932; anything else is refused). The engine's notices — encoding adoption, sheet selection, missing formula caches — surface in the result details, never in the table area or the history. - Sanitize history tab — every sanitize run (folder and single image) is listed in its own tab with timestamp, folder, config, output location, files and ok count, masked items, and integrity failures, and refreshes the moment a run completes.
- Runs entirely on your machine — scanning happens 100% locally. Submission contents never leave your device: no cloud upload, no API calls involved.
- Zero-dependency core — the scanning engine (
sieve_tray.py) itself uses only the Python standard library plus Sieve Lens / Sieve Scope / Sieve Referee. The GUI is an optional layer (PySide6) on top, kept separate so the core stays consistent with the rest of the Sieve series' "zero dependency, offline, deterministic" design. - Cross-platform desktop builds — CI produces standalone Windows and macOS (Apple Silicon + Intel) apps via PyInstaller; no Python installation required to run them.
📦 Installation
Option 1: Download a pre-built app (recommended)
No Python required. Download the build for your platform from the
latest release -
the asset names are decided from the tag, and <version> below is the
release version:
| Platform | Asset |
|---|---|
| Windows | SieveTray-<version>-windows.zip |
| macOS (Apple Silicon / M-series) | SieveTray-<version>-macos-arm64.zip |
| macOS (Intel) | SieveTray-<version>-macos-intel.zip |
Unzip and run SieveTray.exe / SieveTray.app. On first launch, macOS will
warn that the developer can't be verified (the app isn't code-signed yet) —
go to System Settings → Privacy & Security and click Open Anyway.
Windows SmartScreen may show a similar warning; choose More info → Run
anyway.
Option 2: Install from source
git clone https://github.com/neguseatama/sieve-tray.git
cd sieve-tray
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[gui]"
python3 sieve_tray_gui.py
Requires Python 3.10–3.13 (PySide6 does not yet support 3.14).
Installing also brings in the readers that check invisible text in HTML and PDF (the CSS analysis of tinycss2 and cssselect2, and the PDF reader pypdf), as add-on packages of Sieve Lens.
Core only, no GUI (for CLI usage or scripting):
pip install -e .
💻 Quick Start
GUI
- Launch the app. It opens on Start — the page names what every page does, and dropping a file or a folder on it lists the pages that can take it (with the input filled for you when you pick one).
- Click Select Folder... and pick a directory containing one subfolder per submission.
- Click Run Scan.
- Browse results in the Check Documents, Compare Code, Compare Texts, and Detect Universal Statements pages — sort by column, filter by filename, and double-click any row for the full per-axis breakdown (audit rows show a separate Certainty Markers section in the detail dialog).
- Export a shareable report with Export HTML Report. Past runs are always available under the History page.
(The interface language defaults to English; switch to Japanese from the Settings dialog. Takes effect after restart.)
CLI
python3 sieve_tray.py path/to/submissions -o report.html
Expects a directory of subdirectories, one per submission:
submissions/
student_a/
essay.docx
solution.py
student_b/
essay.docx
solution.py
As a library
from pathlib import Path
from sieve_tray import run_scan, render
result = run_scan(Path("submissions"), progress=print)
print(result.doc_results) # path / mask / flagged / h_states / evidence
print(result.code_pairs) # a / b / mask / h_states / scores
print(result.text_pairs) # a / b / signal / mask / pattern_name / reason / h_states / scores
print(result.audit_results) # v0.8.0: file / sentence_sha256 / sentence_text /
# patterns / backing / scope / signal /
# pattern_name / reason / certainty_markers /
# modifier_vocab_sha256 / modifier_vocab_count
Path("report.html").write_text(render(result))
🚀 First launch
Download the zip for your platform from the
latest release,
unzip it, and run SieveTray. macOS shows its Gatekeeper note once — open
System Settings → Privacy & Security and click Open Anyway;
Windows shows its SmartScreen note once — click More info →
Run anyway; after that the app starts normally. Each release also
publishes a SHA256SUMS.txt list next to the assets, so you can verify
the download before the first start — shasum -a 256 SieveTray-<version>-macos-arm64.zip (macOS/Linux) or certutil -hashfile SieveTray-<version>-windows.zip SHA256 (Windows) — and compare it with
the list.
🖼️ Screenshots
| Main window (the Start page) | Anonymize Tables |
|---|---|
| File List and Check Code | Draw |
|---|---|
| Clean Metadata | Normalize |
|---|---|
| Compare Tables | |
|---|---|
🔬 Testing
pip install -e . pytest
pytest -v
132 tests cover the core scan/render pipeline (including regression tests for a CSS rendering bug and for Sieve Referee's paraphrase detection), the history/settings storage layer (save / load / delete / retention pruning, including migration from pre-Referee databases), and the i18n string tables (English/Japanese key parity), plus the vendored Sieve Redact integration (byte-pin sync and exit-code mapping), and the image sanitize path (region helpers, receipt handling, and editor widgets under an offscreen Qt platform), and the folder-uniform image sanitize flow (config-kind routing, excluded-file reporting, and tree-level config errors), and the bundled Sieve Crowd integration (core wrapper, storage, UI widgets, report section, vendor pin sync, and the About engine list).
CI runs this suite on every push (Python 3.12, on Ubuntu), and builds Windows/macOS desktop apps on every version tag.
⚠️ Known Limitations
- Code comparison is Python-only.
.pyis the only extension routed to Sieve Scope; other languages are treated as plain documents (or ignored) for now. - Text-similarity comparison is plain-text only.
.txt/.mdare routed to Sieve Referee; rich formats (.docx,.pdf) are not currently extracted to plain text for this comparison, even though Sieve Lens still observes them individually. - Sieve Referee's
reasontext is Japanese-only, regardless of UI language, since the engine's similarity thresholds are calibrated for Japanese text. The detail dialog surfaces it labeled as such. - Desktop builds are not code-signed. Windows SmartScreen and macOS Gatekeeper will warn on first launch; this is expected for an unsigned build.
- This is an observation tool, not a judgment tool (inherited from Sieve Lens, Sieve Scope, and Sieve Referee). A flag means "a human should look at this", not "this is confirmed misconduct".
- Sanitize covers plain text and PNG images only — the folder Sanitize
action routes by config kind (region-only configs target PNGs,
rule/builtin configs target
.txt/.md) in a background thread; the image editor handles single PNGs (8-bit RGB/RGBA, non-interlaced). Both write a machine-readable receipt next to every output. PDF and JPEG masking are not supported by the bundled engine. - Quantifier audit is Japanese-calibrated (new in v0.8.0). The audit lane's default universal-scope vocabulary and modifier vocabulary are tuned for Japanese text; sentences in other languages may not trigger the lane even when they make equivalent universal claims. The lane surfaces the vocab sha256 and count in the detail dialog so the calibration is visible, and the modifier-vocab file can be overridden from Settings.
- Quantifier audit surfaces candidates, not verdicts. A RED signal
means "this sentence makes a universal claim with no backing recorded in
the tagfile" — it is a hallucination candidate, not a confirmed
hallucination. The tagfile is the source of truth for backing labels
(
theorem/enumerated/sample/unbacked); audit_text() does not populate the tagfile automatically. A human must confirm whether a flagged sentence is actually unbacked or merely un-tagged. - Anonymization protects against the declared quasi-identifiers only
(new in v0.10.0). Sieve Crowd's k-anonymity guarantee holds against an
outsider who knows exactly the columns declared as
qi; columns you forget to declare are not protected. The declared qi, the achieved k, and the before/after alone-row counts are always surfaced, so the protection scope stays visible — and the engine refuses to write an output file when the requested k is not achievable.
📚 Related Projects
- Sieve Core — deterministic structure aggregation & confidence scoring base engine
- Sieve Lens — invisible-content observation engine (documents)
- Sieve Scope — code similarity detection engine
- Sieve Referee — text paraphrase / plagiarism detection engine
- Sieve Redact — deterministic masking with change records (text & PNG)
- Sieve Order — prompt surface structure observation engine (6-bit observation space)
- Sieve Crowd — table anonymization / privacy protection engine
🎨 Application Icon
Design: AURA_HYSTERICA
📄 License
MIT License. See LICENSE for details.
👤 Author
- Kai IWASAKI
Metadata
Release files for sieve-tray 2.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sieve_tray-2.5.1.tar.gz | 518.8 kB | Without provenance | Details for sieve_tray-2.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sieve_tray-2.5.1-py3-none-any.whl | Python 3 | none | any | Details for sieve_tray-2.5.1-py3-none-any.whl |
Total release size: 849.1 kB
Release files / sieve_tray-2.5.1.tar.gz
| Download URL | sieve_tray-2.5.1.tar.gz |
|---|---|
| Size | 518.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af98e50dcd4dd51aab7b064e0fb68f0ce28844853668516f70a7bea0dafe63b5
|
|
BLAKE2b-256 checksum How to use checksums |
39be9172b5b3c75b09f6a50e4078f087ddb1f39c0b20fb202b6c0f54422491f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / sieve_tray-2.5.1-py3-none-any.whl
| Download URL | sieve_tray-2.5.1-py3-none-any.whl |
|---|---|
| Size | 330.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5dbaabe922c8a66e3014c136080b4beeb185845307372e4a89de75f365f1c52
|
|
BLAKE2b-256 checksum How to use checksums |
5e5a8b82e00fcc9aaebcaa3104b9eaf700492277e7fbc12118779e16d986fe72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for sieve-tray 2.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.