Populate EPAC from pinned stack research - #1
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a341f091d
ℹ️ 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".
|
|
||
| CONSTRUCTOR_ID = "epac.public_gonol" | ||
| CONSTRUCTOR_VERSION = "v1" | ||
| PINNED_PUBLIC_GONOL_SHA256 = PUBLIC_GONOL_SHA256 |
There was a problem hiding this comment.
Pin the expected UCNS digest independently
When EPAC is imported with any UCNS revision other than the one pinned in docs/PROVENANCE.md and the checked CI workflow, this assignment adopts that revision's exported digest, and _geometry() compares it with a hash computed by the same revision. The check therefore accepts any internally consistent UCNS installation instead of failing closed, allowing constructor-v1 receipts to be generated from an unreviewed carrier; store the expected digest as EPAC-owned data or verify the dependency's immutable identity.
AGENTS.md reference: AGENTS.md:L7-L8
Useful? React with 👍 / 👎.
|
|
||
| SOURCE_COMMITS = { | ||
| "metapat": "34d954aa1e2092e615b03a180500f6b6977f501e", | ||
| "ucns": "1975fe70cf4e0826a8020c2da3047569e277af64", |
There was a problem hiding this comment.
Stamp receipts with the UCNS revision actually used
Every current affixiate_element() call executes public_gonol_function and native_mobius_state from the CI-resolved UCNS commit 828c0b8..., but its canonical record claims that UCNS commit 1975fe70... supplied the construction. Thus newly generated receipts contain false dependency provenance even if those two revisions happen to return identical values; retain the old identifier only on explicitly historical fixtures and stamp live constructions with their actual pinned dependency.
AGENTS.md reference: AGENTS.md:L7-L8
Useful? React with 👍 / 👎.
| expected = tuple(sorted((_coupling_signature(item) for item in couplings), key=repr)) | ||
| actual = tuple(sorted((_structure_part_signature(item) for item in parts), key=repr)) |
There was a problem hiding this comment.
Validate the entire derived structure before sealing it
For callers of the public constructor that supply a structure, this comparison validates only the coupling, arity, and charge state in parts; fields such as degree, participating_dimension_count, quaternions, and the ternary/cartesian flags can be arbitrary. Such an inconsistent structure is accepted, hashed, and returned as a deterministic receipt, so downstream comparison code can consume fabricated geometry; recompute these derived fields from the couplings or validate the complete structure.
Useful? React with 👍 / 👎.
| """Order-invariant 4-component representations of each local 3.""" | ||
|
|
||
| return tuple( | ||
| sorted( |
There was a problem hiding this comment.
Sort quaternion readouts with the heterogeneous-value key
When a dimensional space contains at least three hub-first couplings and mixes charged and uncharged dimensions, the quaternion component tuples contain both integers and None. This bare sorted() then attempts to order None against an integer and raises TypeError, although optional charges are explicitly supported by Dimension; use the existing _sortable_tree key as the charged readout does.
Useful? React with 👍 / 👎.
| if item.arity != 2: | ||
| continue | ||
| hub_id, instance_id = item.declared_ids | ||
| by_hub.setdefault(hub_id, []).append(instance_id) |
There was a problem hiding this comment.
Reject duplicate couplings before forming local threes
If a caller declares the same hub coupling twice, such as two copies of ("z", "x"), both copies are appended as separate instances and local_three_structures() emits ("z", "x", "x"). That produces a purported three-dimensional quaternion with the same dimension repeated even though instance identity is occurrence-specific; reject duplicate coupling declarations or deduplicate them before combining distinct instances.
Useful? React with 👍 / 👎.
| for item in closed_participants: | ||
| if not isinstance(item, ClosedPublicGonol): | ||
| raise PublicGonolConstructionError("participants must already be closed EPAC public gonols") |
There was a problem hiding this comment.
Verify participant receipts before accepting closure
For callers of the public constructor, this loop checks only that each participant is an instance of the exported ClosedPublicGonol dataclass. A caller can instantiate that class directly with fabricated atomic_id, receipt_digest, geometry, or nested participant fields, and the parent receipt then hashes those claims as an already-closed participant; accept verifiable receipts instead or recompute and validate every participant identity before closure.
Useful? React with 👍 / 👎.
| tmp = path.with_name(f".{path.name}.vm-mcp.tmp") | ||
| tmp.write_bytes(encoded) | ||
| os.replace(tmp, path) |
There was a problem hiding this comment.
Create temporary files without following symlinks
In workspace or personal-console mode, a caller can pre-create the predictable .<name>.vm-mcp.tmp path as a symlink to a file outside VM_MCP_ROOT. write_bytes() follows that symlink and overwrites the external target before os.replace() runs, violating the promised write confinement; create a unique temporary file with exclusive, no-follow semantics and atomically rename its file descriptor-backed path.
Useful? React with 👍 / 👎.
| path = resolve_under_root(config.root, requested) | ||
| if path == config.root.expanduser().resolve(strict=False): | ||
| raise PermissionError("refusing to remove VM_MCP_ROOT") | ||
| if path.is_dir() and not path.is_symlink(): | ||
| if recursive: | ||
| shutil.rmtree(path) |
There was a problem hiding this comment.
Unlink the requested symlink instead of its target
When requested is a symlink whose target is inside VM_MCP_ROOT, resolve_under_root() returns the resolved target path, so the later symlink check cannot see the original link. For example, recursively removing a link to a directory deletes the real directory and leaves a broken link behind; preserve and unlink the terminal symlink while separately validating that its parent is confined.
Useful? React with 👍 / 👎.
| if command -v git >/dev/null 2>&1 && git -C "$SOURCE_ROOT" rev-parse HEAD >/dev/null 2>&1; then | ||
| SOURCE_COMMIT="$(git -C "$SOURCE_ROOT" rev-parse HEAD)" | ||
| fi |
There was a problem hiding this comment.
Record the canonical skill-lib source commit
When this repo-local snapshot is installed from EPAC, git -C "$SOURCE_ROOT" rev-parse HEAD resolves the containing EPAC commit rather than the canonical skill-lib commit recorded in .agents/skills/README.md. /opt/vm-mcp/SOURCE_COMMIT therefore misidentifies the reviewed runtime source and cannot support the audit procedure described by the skill; pass or read the pinned skill-lib identity explicitly instead of deriving it from the consuming repository.
AGENTS.md reference: AGENTS.md:L7-L8
Useful? React with 👍 / 👎.
| mcp = MCPServer("vm-mcp") | ||
|
|
||
| READ_ONLY = ToolAnnotations(readOnlyHint=True, openWorldHint=False) | ||
| WRITE_FS = ToolAnnotations(readOnlyHint=False, destructiveHint=False, idempotentHint=False, openWorldHint=False) |
There was a problem hiding this comment.
Mark overwriting filesystem tools as destructive
WRITE_FS declares destructiveHint=False, but write_text() overwrites existing files and move_path() uses os.replace() to overwrite an existing destination. MCP clients that use annotations to present approvals or distinguish destructive actions receive incorrect metadata for these calls; give the overwriting tools a destructive annotation, separating make_directory if necessary.
Useful? React with 👍 / 👎.
Purpose
Extract the EPAC research candidate from
The-Interdependency/stack@ef51f2e8f32ccfd5394525dad72475a61a505bc1:research/epacinto its independent repository without promoting research status beyond the evidence.Included
skill-libsnapshot at8dfb974ea0cee72e4412f9d2c8b597a8930a4d57;The-Interdependency/ucns@828c0b8bbcfc267efb5701da714191c1f73a81ff;Verified extraction
FALSIFIED;19f468b9773f71fc78ad58e15ebf3b36ed7fc001ade57846ba0bba9dc84e1631verified.Authority boundary
Physical extraction does not complete graduation.
docs/graduation.jsonremainsstabilizing; clean build/install and license gates fail, while stable release, downstream reconsumption, and the authority-transition receipt remainhmmm.hmmm