Skip to content

feat(research): add strict digital metrics protocol - #46

Open
erinepshovel-code wants to merge 25 commits into
mainfrom
research/digital-metrics-v0
Open

erinepshovel-code wants to merge 25 commits into
mainfrom
research/digital-metrics-v0

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Summary

  • add a strict Stack-local digital-metric record and receipt protocol
  • bind exact METAPAT and UCNS producer identities without transferring semantic, proof, measurement, or empirical status
  • preserve participant identity, ordered relations, multiplicity, and provenance
  • reject missing-as-zero, bool/int aliasing, floats, unknown fields, stale digests, and dirty/wrong producer checkouts
  • add deterministic receipt generation, byte-identical replay, adversarial witnesses, and exact-commit CI
  • record merged EDCM fail-closed decoder repair as a future prerequisite; v0 invokes no EDCM measurement

Validation

  • contract audit: 8 contracts / 11 checks / 0 findings
  • unit tests: 11 passed
  • fresh receipt generation equals the committed bytes
  • receipt payload digest: 0f39bc72ce631193d8a53c0b9765c7fc11201f8466239f41a789320caa119283
  • receipt file SHA-256: 86666b1a001b54dee3c877498c2f51a6bfe4a5c3dd64f68fa7a3fadf3d477f17
  • Stack consistency: pass (7 repositories, 18 research participant identities)

Standing

INCUBATING / TEST-BACKED STACK RESEARCH. This establishes strict representation, structural observation, and replay only. EDCM projection selection, empirical calibration, producer signatures, and an independently implemented verifier remain unresolved.

hmmm: the first irreducible assumption is the selection of an EDCM projection from an exact structural observation to a named construct; the next resolving experiment must preregister that projection and evaluate a blind held-out set against matched controls.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T03:41:43.664796Z 28647b5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ed3f06916

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/metric_protocol.py Outdated
Comment thread research/digital-metrics/generate_receipt.py Outdated
Comment thread research/digital-metrics/generate_receipt.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22d7ec9273

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/generate_receipt.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27ac5e0186

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/generate_receipt.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bc32e4100

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/generate_receipt.py
Comment thread research/digital-metrics/verify_receipt.py Outdated
Comment thread research/digital-metrics/generate_receipt.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba7e539670

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/generate_receipt.py Outdated
Comment thread research/digital-metrics/generate_receipt.py Outdated
Comment thread research/digital-metrics/metric_protocol.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a4a4805f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/verify_receipt.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/generate_receipt.py Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0c054bee4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/generate_receipt.py Outdated
Comment thread research/digital-metrics/verify_receipt.py Outdated
Comment thread .github/workflows/stack-consistency.yml Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96b2d40f58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/generate_receipt.py Outdated
Comment thread research/digital-metrics/metric_protocol.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f37b1774ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/WORK_GRAPH.json
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 167c829cf3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/metric_protocol.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18f3aa1e65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/metric_protocol.py Outdated
Comment thread .github/workflows/stack-consistency.yml
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact head b736309 after the post-construction runner, repository graph projection, graph-selected skill-lib commit, and generator-witness closures.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b736309726

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py
Comment thread research/digital-metrics/README.md Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/generate_receipt.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact head bfc1feb after exact witness-method preservation/execution, complete data snapshots, Stack baseline ancestry resolution, and EDCM execution-scope correction.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfc1feb13a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py Outdated
Comment thread tools/check_stack_consistency.py
Comment thread research/digital-metrics/audit_contracts.py Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 9229fe5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9229fe57f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/check_stack_consistency.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head ae41ff2

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae41ff2c15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py
Comment thread tools/check_stack_consistency.py Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 7d886cd

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d886cd4b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py
Comment thread research/digital-metrics/audit_contracts.py
Comment thread tools/check_stack_consistency.py Outdated
Comment thread research/digital-metrics/audit_contracts.py

@erinepshovel-code erinepshovel-code left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publishing accumulated exact-head fix receipts; current merge remains gated on a fresh review of 88079f5.

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/WORK_GRAPH.json
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py
Comment thread tools/check_stack_consistency.py Outdated
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 88079f557f21f199e69d40f6fff88f608d94485d

@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 88079f5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88079f5522

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py
Comment thread research/digital-metrics/audit_contracts.py
Comment thread tools/check_stack_consistency.py
Comment thread research/digital-metrics/metric_protocol.py
Comment thread tools/check_stack_consistency.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 2b1b082

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b1b0825d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py
Comment thread research/digital-metrics/metric_protocol.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head f6cf01a

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6cf01a936

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread research/digital-metrics/audit_contracts.py Outdated
Comment thread tools/check_stack_consistency.py
@erinepshovel-code

Copy link
Copy Markdown
Contributor Author

@codex review exact head 8413344

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 841334406a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +642 to +645
report_fd = os.dup(1)
report_write = os.write
report_close = os.close
shutdown_marker = base64.b64decode(payload.pop("shutdown_marker"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the report channel out of witness stack frames

When witness code walks sys._getframe().f_back to _run_isolated_witness, it can read report_fd and shutdown_marker from that frame's locals, write a forged clean execution report and marker with os.write, then call os._exit(0). Fresh evidence after moving these values from globals to function locals is that, at exact head, this still makes _run_unittest_witnesses() return (True, '', 1) without executing an admitted failing test, allowing its contracts to receive proof credit; construct and authenticate the report outside the interpreter that executes witness code.

AGENTS.md reference: AGENTS.md:L96-L102

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed at current head 28647b5 and intentionally left unresolved. Arbitrary Python witness code cannot provide unforgeable evidence about its own execution while sharing the interpreter or any reachable result channel; moving the descriptor, token, or callback only relocates the bypass. A defensible fix requires a separately trusted execution monitor/sandbox or replacing executable Python witnesses with a restricted declarative witness language. Merge is held pending that architectural choice.

Comment thread tools/check_stack_consistency.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28647b5b29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +591 to +595
changed_result_callbacks = sorted(
name
for name, callback in trusted_result_callbacks.items()
if AppendOnlyWitnessResult.__dict__.get(name) is not callback
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Detect transient result callback replacements

When a witness replaces the result class's addError and addFailure callbacks with no-ops, registers a failing cleanup, and then restores both callbacks in later LIFO cleanups, the failure is swallowed and this post-run identity comparison sees the restored originals. At the reviewed tree, that fixture makes _run_unittest_witnesses() return a clean one-test result despite the cleanup raising AssertionError; fresh evidence beyond the previously fixed class-level replacement path is that restoring the callbacks before validation evades the new check. Protect these callbacks throughout cleanup execution or record outcomes through a channel witness code cannot override.

AGENTS.md reference: AGENTS.md:L96-L102

Useful? React with 👍 / 👎.

Comment on lines +163 to +164
source = re.sub(r"<!--.*?-->", "", source, flags=re.DOTALL)
source = re.sub(r"<!--.*\Z", "", source, flags=re.DOTALL)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude raw HTML blocks from manifest parsing

When the complete ### Digital metrics exact projection section is wrapped in <pre>...</pre>, Markdown treats its headings and tables as raw preformatted text, but this preprocessing retains every inner line and the checker still accepts them as the rendered projection. I reproduced check_digital_metrics_projection() returning no findings for that mutation; fresh evidence after the comment and fence hardening is that raw HTML blocks provide another way to hide the required human authority projection while the structural gate passes. Parse rendered Markdown semantics or exclude raw HTML blocks before section discovery. .agents/skills/stack-update/SKILL.mdL89-L101

Useful? React with 👍 / 👎.

Comment on lines +439 to +441
for field in ("commit", "authority", "relation"):
if manifest_entry.get(field) != graph_entry.get(field):
error(findings, "digital_metrics.projection", f"{repository}: {field} differs from work graph")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the fixed participant authority split

When a participant's authority is changed consistently in the work graph, machine manifest, and human authority table, this loop checks only projection equality and accepts the new claim. I reproduced a self-digested graph and manifest that assign EDCM semantic definitions, geometry, and proof status while all transfer flags remain false, and the complete structural checks inspected here return no findings; fresh evidence after the fixed-boundary hardening is that the authority strings themselves remain unconstrained. Require the v0 participant authority split so coherent edits cannot transfer METAPAT or UCNS ownership to EDCM.

AGENTS.md reference: AGENTS.md:L23-L25

Useful? React with 👍 / 👎.

Comment on lines +237 to +240
def load_work_graph(path: Path) -> dict[str, Any]:
value = json.loads(path.read_text(encoding="utf-8"))
expected = {"schema", "version", "participants", "boundaries", "work_graph_sha256"}
if not isinstance(value, dict) or set(value) != expected:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject duplicate keys in work-graph JSON

When WORK_GRAPH.json repeats a member such as commit, Python's json.loads silently keeps the last value, so this validator and the stack checker validate and digest only the collapsed mapping rather than rejecting the ambiguous source. I reproduced a participant containing an all-zero commit followed by the currently pinned commit being accepted with the unchanged work-graph digest; generation and replay can therefore attest the same receipt even though the repository-owned authority record encodes two source identities and another JSON consumer may select the first. Parse with duplicate detection before validating or hashing the graph. .agents/skills/stack-update/SKILL.mdL89-L97

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant