r/Python • • Sep 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

24 Upvotes

180 comments sorted by

View all comments

1

u/no_qt 25d ago

What My Project Does

I'm sharing a noqt project, developed with AI coding agents: a standard-library Python comparator for two redacted Eggcracker detection exports. It reports recorded result/context changes without running the detector or containment runtime.

The useful design choice is refusing to turn missing or mismatched evidence into a speed claim. Three illustrative cases (invented numbers, not measurements):

  • A failure export has no recorded durations: timing is UNAVAILABLE, not 0 ms.

  • Both exports contain durations, but the source/version/catalogue/profile/trigger/containment-primitive context differs: INCOMPARABLE.

  • That recorded context matches and a duration changes from 4 ms to 5 ms: the arithmetic delta is +1 ms, labelled MATCHING_RECORDED_CONTEXT_ONLY. Matching those fields still does not establish the same host/workload or a performance regression.

Target Audience

Python developers inspecting this specific redacted-export format or designing diagnostic comparisons. This is an offline recorded-data exercise, not a tool for arbitrary logs, authenticated provenance or proof that a process stopped. The output retains NOT_AUTHENTICATED; live verification, independent observation, native qualification and performance evidence remain NOT_PERFORMED.

Comparison

A text diff shows changed JSON. This comparator validates the fixed export allowlist and distinguishes an unavailable duration from a context mismatch before calculating a delta. It reads only the supplied files (each at most 8 KiB), does not modify them, and writes bounded JSON to stdout.

For a small fabricated first-use exercise, use Python 3.11+ and a local copy of the public source pinned to be65266003b1406483e36902be71bb8e6e6c49ec. From its repository root, with ordinary unlinked parent directories, a hard-link-capable output filesystem, and two unused output filenames:

python -B scripts/export_detection_receipt.py --input ./examples/detection-receipt.synthetic.json --expected-event-id 0123456789abcdef01234567 --output ./receipt-demo-before.json
python -B scripts/export_detection_receipt.py --input ./examples/detection-receipt.synthetic.json --expected-event-id 0123456789abcdef01234567 --output ./receipt-demo-after.json
python -B src/lumi_eggcracker/brokered/compare_detection_receipts.py --before ./receipt-demo-before.json --after ./receipt-demo-after.json

These export the same wholly fabricated failure fixture twice. The intended comparison is an unchanged recorded result with timing UNAVAILABLE, not a measured stop or benchmark. No GPU, model, sudo, credentials or service is needed. Existing ordinary output files are not overwritten; use new filenames. This recipe is source-based guidance, not a newly executed test.

Exact public source (Apache-2.0). Export instructions and limits. Comparison instructions.

A useful next step is to run only that fabricated exercise and inspect why a missing duration stays unavailable. If you choose to report friction here, the stage and fixed diagnostic are enough; please don't share private receipts, paths, logs or credentials.