Skip to content

refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01) - #299

Open
cryptoxdog wants to merge 1 commit into
claude/odoo-gate-sdk-integration-yg6oshfrom
claude/sdk-participation-adoption-ceg
Open

cryptoxdog wants to merge 1 commit into
claude/odoo-gate-sdk-integration-yg6oshfrom
claude/sdk-participation-adoption-ceg

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Problem

refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)

CEG no longer owns Gate registration. The SDK chassis calls create_node_app() with SDK registration on, so Gate_SDK registers the node at startup, re-registers every GATE_REREGISTRATION_INTERVAL_SECONDS after a Gate restart, and answers GET /v1/ready 503 until Gate accepts the node.

Closes #

Fix

refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)

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=3225936243 passed_at=2026-09-28T00:46:52Z
L4 receipt present: phase=release_authorized tree_digest=030bdc237f19fe80cf0185aded56c712fd54213288f17a0bb2f0f09a48e8c263 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

  • n/a

Modified

  • chassis/node_app.py — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)
  • docs/FEATURE_GATES.md — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)
  • engine/boot.py — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)
  • engine/config/settings.py — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)
  • tests/integration/test_gate_registration.py — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)

Deleted

  • engine/gate_registration.py — refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)

Files touched

  • M chassis/node_app.py
  • M docs/FEATURE_GATES.md
  • M engine/boot.py
  • M engine/config/settings.py
  • D engine/gate_registration.py
  • M tests/integration/test_gate_registration.py

Commits

  • refactor(gate): adopt Gate_SDK node participation (L9-PARTICIPATION-01)

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 chassis/node_app.py
  • M docs/FEATURE_GATES.md
  • M engine/boot.py
  • M engine/config/settings.py
  • D engine/gate_registration.py
  • M tests/integration/test_gate_registration.py

Generated by Claude Code

CEG no longer owns Gate registration. The SDK chassis calls
create_node_app() with SDK registration on, so Gate_SDK registers the node
at startup, re-registers every GATE_REREGISTRATION_INTERVAL_SECONDS after a
Gate restart, and answers GET /v1/ready 503 until Gate accepts the node.

- chassis/node_app.py: drop auto_register_with_gate=False
- engine/boot.py: GraphLifecycle no longer registers or runs a loop
- engine/gate_registration.py: removed
- settings: remove gate_reregistration_enabled / _interval_seconds
- docs/FEATURE_GATES.md: row and section 17 point at the SDK
- tests: assert the retired loop is gone and the SDK owns participation

Requires Gate_SDK 1.2.0 on @v1 (Quantum-L9/Gate_SDK#55). Proven on the
Constellation Docker rail from #298 (27/27 mandatory, incl. recovery after a
Gate outage).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LM9xC9uVBfvnHKRK9jJEyC
@github-actions

Copy link
Copy Markdown

✅ PR reviewable size is within recommended limits

@github-actions

Copy link
Copy Markdown

L9 Audit Harness Report

  • Generated: 2026-09-28T00:47:09.143108+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 15
🔵 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.

Copy link
Copy Markdown
Collaborator Author

CI will stay red until Gate_SDK 1.2.0 is on @v1. This PR drops CEG's own registration loop. It relies on create_node_app() participation (NodeParticipation, /v1/ready) from Quantum-L9/Gate_SDK#55, and @v1 currently resolves to 1.1.0, which does not include it. The consumer contract forbids pinning a branch or SHA, so this PR makes no manifest change. Once #55 merges and v1.2.0 is tagged and promoted, CI re-resolves @v1 and this PR needs no further change.

Local proof, run with Gate_SDK eaac6a8 installed over the @v1 pin:

  • make lint is clean.
  • Full pytest: 2172 passed, 18 skipped, 56 xfailed.
    • 22 testcontainers errors come from Docker Hub rate-limiting (429) the neo4j:5.18-enterprise pull.
  • The same change ran on the Docker rail in test(e2e): add Odoo consumer overlay to the Constellation Docker rail #298 (run 20260927T022821Z): 27/27 mandatory checks passed, including recovery after a Gate outage.

Merge order: #298, then this PR, after the SDK release.


Generated by Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@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: b7844ad5a8

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

def test_reregistration_is_a_documented_default_on_flag():
from engine.config.settings import Settings
parameters = inspect.signature(create_node_app).parameters
assert "registration" in parameters, "Gate_SDK >= 1.2.0 (L9-PARTICIPATION-01) is required"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Refresh the production SDK lock before deleting the fallback

This test requires Gate_SDK >=1.2.0, but poetry.lock still resolves version 1.1.0 at e9f829f..., and Dockerfile.prod:26-32 installs that lock. Consequently, the production image lacks the participation readiness and re-registration implementation assumed here; because this commit also removes CEG's own loop, a Gate restart leaves the production node unroutable until CEG restarts. Refresh the lock to the released SDK revision as part of this change.

Useful? React with 👍 / 👎.

Comment thread chassis/node_app.py
lifecycle_hook=SdkLifecycleAdapter(),
auto_register_with_gate=False,
)
app = create_node_app(lifecycle_hook=SdkLifecycleAdapter())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the SDK participation cutover with a CEG setting

This call unconditionally switches registration and readiness ownership to the SDK while the prior implementation and its settings are deleted. GATE_REGISTRATION_ENABLED can disable registration entirely, but there is no CEG boolean setting that stages or rolls back this behavioral cutover, contrary to the repository requirement that every behavioral change be gated in engine/config/settings.py; retain a flagged fallback until the rollout is complete.

AGENTS.md reference: AGENTS.md:L95-L95

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

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-28T00:49:57.673642Z b7844ad 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.

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.

2 participants