____14DS — Events as Flags Enum and events_result
Trigger S6, Finding AP7
The event chain from DS03 (state machine with prev_event_sha256) stalled in
its first use as individual files — the finding (repo bloat) and the
correction led to the flags representation in the container: the steps are
bits, the result is a bitmask.
The Enum Definition
Anchored normatively in the schema (not repeated per container):
| Step | Bit | Meaning |
|---|---|---|
offered |
1 | Signature requested (document presented for signing) |
accepted |
2 | Recipient has taken note (§ 126b Abs. 1 BGB: access) |
denied |
4 | Recipient rejects (excludes sign) |
sign |
8 | Signing executed (facsimile/key reference) |
withdraw |
16 | Signing withdrawn (excludes sign) |
The Flags Set
"events": {
"enum_definition": {
"offered": 1, "accepted": 2, "denied": 4, "sign": 8, "withdraw": 16
},
"flags_set": {
"offered": { "set": true, "timestamp_utc": "2026-09-13T17:31:00Z", "uuidV7": "…", "sha256": "f1358236…" },
"accepted": { "set": true, "timestamp_utc": "2026-09-13T17:33:00Z", "uuidV7": "01a09bd4…", "sha256": "71905eea…" },
"denied": { "set": false, "timestamp_utc": null, "uuidV7": null, "sha256": null },
"sign": { "set": true, "timestamp_utc": "2026-09-13T17:35:00Z", "uuidV7": "01a09bd6…", "sha256": "dab7ddfe…" },
"withdraw": { "set": false, "timestamp_utc": null, "uuidV7": null, "sha256": null }
},
"events_result": 11,
"chain_valid": true
}
The Result: events_result = 11
offered(1) + accepted(2) + sign(8) = 11
| Result | Interpretation |
|---|---|
| 1 | only offered — pending |
| 2 | only accepted — without offered (irregular, verify) |
| 3 | offered + accepted — ready for signing |
| 11 | offered + accepted + sign — fully signed |
| 4 | denied — rejected (no sign) |
| 16 | withdrawn — taken back |
| 7 | offered + accepted + denied — contradiction (chain_valid=false) |
The bitmask is deterministically verifiable — an auditor recalculates:
jq -r '.events.events_result' container.gcpn.md
jq -r '[.events.flags_set[] | select(.set == true)] | length' container.gcpn.md
# → Anzahl der gesetzten Bits muss mit Popcount(events_result) übereinstimmen
No Contradiction Possible
The state machine (DS03) and the bit semantics together prevent irregular sequences:
denied(4) excludessign— after rejection, signing is not possible.withdraw(16) excludessign— after withdrawal, the process is concluded.chain_valid: false=prev_event_sha256chaining has gaps — evidentiary value reduced (DS04).
Research Gain Protocol (AP7)
| AP | Finding | Implementation |
|---|---|---|
| AP7 | Events as individual files → bloat; state sequence as text | Flags enum with events_result bitmask + chain_valid |
The prev_event_sha256 chaining remains (summarized as the chain_valid
confirmation) — the bits replace the repetition of the state machine,
not the integrity check.
Created: 260913 | Part III, Article ____14DS | Series: digital-signage