Skip to content

fix(deps): complete Gate_SDK @v1 pin — lock, validator, and hook - #282

Merged
cryptoxdog merged 4 commits into
mainfrom
agent/cursor/issue-266
Sep 19, 2026
Merged

cryptoxdog merged 4 commits into
mainfrom
agent/cursor/issue-266

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Problem

fix(deps): complete Gate_SDK @v1 pin — lock, validator, and hook (+2 more commits below)

PR #263 adopted the moving major tag in the manifests. Sync poetry.lock to that tag and replace the SHA fail-closed check so main is coherent.

Closes #266

Fix

Risk

  • Low — additive, reversible, no data or contract change — n/a — not this change
  • Medium — touches shared code, config, or a public interface
  • High — breaking change, migration, IAM/network, or irreversible — n/a — not this change

Blast radius: measured paths in Changes by intent
Rollback: revert this PR

Evidence

gate-receipt.json present: schema=l9.pr_gate_receipt.v2 content_digest=3620120256 passed_at=2026-09-19T14:21:59Z
L4 receipt present: phase=release_authorized tree_digest=a582a028d0f13001113aeb2d630867fd8ab818087f91260dc82e8a46603f4f08 kernel_evidence=evidenced

Gates

  • Regression test added that fails without this fix — n/a — not this change
  • No secrets, tokens, or customer data in code, tests, fixtures, or logs
  • semgrep clean, or findings triaged below — n/a — not this change
  • New IAM / workflow permissions are least privilege and enumerated — n/a — not this change
  • Third-party actions pinned to a full commit SHA — n/a — not this change
  • Public interface change is documented and versioned — n/a — not this change
  • Observability exists for the new path (metric, log, trace, or alert) — n/a — not this change

Reviewer focus

See Changes by intent and Protected-root (if any additive_only path).

Changes by intent

Added

Modified

  • poetry.lock — fix(deps): complete Gate_SDK @v1 pin — lock, validator, and hook
  • scripts/validate_sdk_pin.py — fix(deps): complete Gate_SDK @v1 pin — lock, validator, and hook
  • tests/unit/test_node_app.py — fix(deps): complete Gate_SDK @v1 pin — lock, validator, and hook

Deleted

  • n/a

Files touched

  • M poetry.lock
  • M scripts/validate_sdk_pin.py
  • M tests/unit/test_node_app.py
  • A tests/unit/test_validate_sdk_pin.py

Commits

Test plan

  • make pr local gate receipt present
  • L4 release receipt present (release_authorized)
  • CI green — not measured by open_pr_after_gate.sh — do not treat as verified

Changed files

  • M poetry.lock
  • M scripts/validate_sdk_pin.py
  • M tests/unit/test_node_app.py
  • A tests/unit/test_validate_sdk_pin.py

cryptoxdog and others added 4 commits September 19, 2026 10:21
PR #263 adopted the moving major tag in the manifests. Sync poetry.lock
to that tag and replace the SHA fail-closed check so main is coherent.

Issue-Remediation-Cycle: #266/cycle-1
Co-authored-by: Cursor <cursoragent@cursor.com>
Leave Make/hook wiring to the cypher-lint PR that already owns those
files. The lock and validator still complete the #263/#266 decision.

Issue-Remediation-Cycle: #266/cycle-1
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings September 19, 2026 14:22
@github-actions

Copy link
Copy Markdown

PR reviewable size is within recommended limits

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 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-19T14:25:42.784100Z 0eb838d PR opened
ℹ️ 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.

@github-actions

Copy link
Copy Markdown

L9 Audit Harness Report

  • Generated: 2026-09-19T14:22:17.442713+00:00
  • Repo root: /home/runner/work/Cognitive.Engine.Graphs/Cognitive.Engine.Graphs
  • Overall result: ✅ PASSED
  • Exit code: 0

Step Results

Step Status Exit Code Notes
Architecture Audit ✅ Passed 0
Spec Coverage ✅ Passed 0
Contract Wiring ✅ Passed 0

Architecture Audit Findings

Severity Count
🔴 CRITICAL 0
🟠 HIGH 0
🟡 MEDIUM 17
🔵 LOW 0

See artifacts/audit_report.md for full details.

Spec Coverage

  • ✅ Implemented: 37
  • ⚠️ Partial: 9
  • ❌ Missing: 0
  • Total features: 46
Category Implemented Partial Missing Total
gates 10 0 0 10
scoring 7 0 0 7
v1.1_node 2 0 0 2
v1.1_edge 2 0 0 2
v1.1_action 0 2 0 2
v1.1_scoring 1 1 0 2
action_handler 0 6 0 6
gds_algorithm 5 0 0 5
research_pattern 10 0 0 10

See artifacts/coverage_report.md for full details.

Next Steps

All checks passed. Safe to merge.

@sonarqubecloud

Copy link
Copy Markdown

@cryptoxdog
cryptoxdog merged commit dfbdad2 into main Sep 19, 2026
55 checks passed
@cryptoxdog
cryptoxdog deleted the agent/cursor/issue-266 branch September 19, 2026 14:23

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The new validator logic is currently too permissive for manifests and can produce misleading errors for invalid lock resolved_reference values due to an overly strict regex match.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates the repository’s Gate_SDK dependency policy enforcement to align constellation-node-sdk with the moving major tag @v1, and synchronizes the Poetry lock plus unit tests to that policy.

Changes:

  • Update scripts/validate_sdk_pin.py from immutable-SHA enforcement to a moving-major @v1 policy (including lockfile validation).
  • Regenerate poetry.lock to constellation-node-sdk 1.1.0 with reference = "v1" and a new resolved_reference.
  • Add/adjust unit tests to cover the updated validator behavior and update an SDK pin docstring reference.
File Description
poetry.lock Updates constellation-node-sdk version and git source reference/resolution to the v1 moving-major policy.
scripts/​validate_sdk_pin.py Reworks SDK pin validation from SHA-based pinning to @v1 moving-major checks (plus lock validation).
tests/​unit/​test_node_app.py Updates docstring to reflect the new @v1 / 1.1.0 pin description.
tests/​unit/​test_validate_sdk_pin.py Adds unit tests covering the new moving-major validator behavior (manifests + lock + repo tree).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +19 to +41
LOCK_REFERENCE_RE = re.compile(
r'name = "constellation-node-sdk".*?\[package\.source\].*?'
r'reference = "([^"]+)".*?resolved_reference = "([0-9a-f]{40})"',
re.DOTALL,
)


def check_text(rel: str, text: str) -> list[str]:
errors: list[str] = []
if CANONICAL_REPO not in text:
errors.append(f"{rel}: missing {CANONICAL_REPO}")
if FORBIDDEN_FORK in text:
errors.append(f"{rel}: {FORBIDDEN_FORK} remains")
if rel == "poetry.lock":
match = LOCK_REFERENCE_RE.search(text)
if match is None:
errors.append(f"{rel}: constellation-node-sdk source block missing")
else:
reference, resolved = match.group(1), match.group(2)
if reference != MAJOR_TAG:
errors.append(f"{rel}: reference={reference!r} (want {MAJOR_TAG!r})")
if not SHA_RE.fullmatch(resolved):
errors.append(f"{rel}: resolved_reference is not a SHA")

@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: 0eb838db5c

ℹ️ 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".

if not SHA_RE.fullmatch(resolved):
errors.append(f"{rel}: resolved_reference is not a SHA")
else:
if MAJOR_TAG not in text:

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 Compare the SDK tag exactly in each manifest

When either manifest uses a revision such as v10 or v1-malicious, this substring check still finds v1 and returns no error, so the repository-tree test approves a dependency that violates the required @v1 policy. Parse the constellation-node-sdk declaration and compare its revision exactly instead of searching the whole file.

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.

CEG-263-001/002: Gate_SDK pin policy decision required (immutable SHA vs moving @v1), lock incoherent until then

2 participants