fix(mcp-health): deterministic MCP namespace attachment (Closes #689) #919

Open
jcwalker3 wants to merge 1 commits from fix/issue-689-deterministic-mcp-namespace into master
Owner

Closes #689

Acceptance Criteria Satisfied

  • Exposed cohort identity (cohort_id, pid, startup_sha, endpoint, config_fingerprint) across handshake, session context, and diagnostics.
  • Refuses stale or ineligible cohorts (stale_cohort_refused).
  • Enforces cohort startup SHA parity matching with authoritative master tip (master_parity_gate).
  • reconcile_id freshness and binding_unchanged tracking.
  • clear_session_context() on disconnect.
  • Comprehensive regression test suite covering all 9 acceptance criteria.
Closes #689 ## Acceptance Criteria Satisfied - Exposed cohort identity (`cohort_id`, `pid`, `startup_sha`, `endpoint`, `config_fingerprint`) across handshake, session context, and diagnostics. - Refuses stale or ineligible cohorts (`stale_cohort_refused`). - Enforces cohort startup SHA parity matching with authoritative master tip (`master_parity_gate`). - `reconcile_id` freshness and `binding_unchanged` tracking. - `clear_session_context()` on disconnect. - Comprehensive regression test suite covering all 9 acceptance criteria.
jcwalker3 added 1 commit 2026-07-25 17:53:16 -05:00
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #919
issue: #689
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: prgs-reviewer-49289-7754a423
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr919-689
phase: claimed
candidate_head: a947bdc186
target_branch: master
target_branch_sha: 2b4e43042a
last_activity: 2026-07-25T23:23:14Z
expires_at: 2026-07-25T23:33:14Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #919 issue: #689 reviewer_identity: sysadmin profile: prgs-reviewer session_id: prgs-reviewer-49289-7754a423 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr919-689 phase: claimed candidate_head: a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc target_branch: master target_branch_sha: 2b4e43042a34f4e29617378ae79a7f5a3d312688 last_activity: 2026-07-25T23:23:14Z expires_at: 2026-07-25T23:33:14Z blocker: none
sysadmin approved these changes 2026-07-25 18:23:43 -05:00
sysadmin left a comment
Owner

Formal review — PR #919 (head a947bdc) · Closes #689

Verdict: APPROVE

Scope

Deterministic MCP namespace/cohort attachment. 6 files, +455/−14. Single commit. Mergeable.

What is good

  • Cohort identity (cohort_id, startup_sha, endpoint, config_fingerprint) seeded into session context and namespace health probes.
  • stale_cohort_refused when bound cohort SHA ≠ authoritative parity SHA.
  • master_parity_gate.assess_master_parity folds cohort into mutation_safe / restart_required.
  • binding_unchanged / prior reconcile_id tracking on post-restart reconcile.
  • clear_session_context() present for disconnect cleanup.
  • Tests: 9 issue-689 tests + master parity suite green (49 passed combined).
  • Author jcwalker3 ≠ reviewer sysadmin.

Validation

pytest tests/test_issue_689_deterministic_cohort_attachment.py → 9 passed.
pytest tests/test_master_parity_gate.py (with issue-689 suite) → 49 passed.
Worktree HEAD matches pin.

Canonical PR State

STATE: approved-awaiting-merge
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #919 at pinned head a947bdc186 when merge policy allows
NEXT_PROMPT:

Merger session: call gitea_allocate_next_work(apply=true, role='merger') for prgs/Scaled-Tech-Consulting/Gitea-Tools. If PR #919 is assigned, merge only that PR at head a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc after merge preflight. Do not self-select. Do not force-push.

WHAT_HAPPENED: Formal APPROVE submitted for PR #919 after code review and tests.
WHY: #689 cohort attachment/refusal criteria met; fail-closed parity; scope clean.
ISSUE: #689
HEAD_SHA: a947bdc186
REVIEW_STATUS: approved / approval_at_current_head
MERGE_READY: true
BLOCKERS: none
VALIDATION: pytest tests/test_issue_689_deterministic_cohort_attachment.py → 9 passed; reviewer approved at head a947bdc186
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; tool=gitea_submit_pr_review
LAST_UPDATED_BY: sysadmin / prgs-reviewer

## Formal review — PR #919 (head a947bdc) · Closes #689 **Verdict: APPROVE** ### Scope Deterministic MCP namespace/cohort attachment. 6 files, +455/−14. Single commit. Mergeable. ### What is good - Cohort identity (`cohort_id`, `startup_sha`, endpoint, `config_fingerprint`) seeded into session context and namespace health probes. - `stale_cohort_refused` when bound cohort SHA ≠ authoritative parity SHA. - `master_parity_gate.assess_master_parity` folds cohort into `mutation_safe` / `restart_required`. - `binding_unchanged` / prior reconcile_id tracking on post-restart reconcile. - `clear_session_context()` present for disconnect cleanup. - Tests: 9 issue-689 tests + master parity suite green (49 passed combined). - Author jcwalker3 ≠ reviewer sysadmin. ### Validation pytest tests/test_issue_689_deterministic_cohort_attachment.py → 9 passed. pytest tests/test_master_parity_gate.py (with issue-689 suite) → 49 passed. Worktree HEAD matches pin. ## Canonical PR State STATE: approved-awaiting-merge WHO_IS_NEXT: merger NEXT_ACTION: merge PR #919 at pinned head a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc when merge policy allows NEXT_PROMPT: ```text Merger session: call gitea_allocate_next_work(apply=true, role='merger') for prgs/Scaled-Tech-Consulting/Gitea-Tools. If PR #919 is assigned, merge only that PR at head a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc after merge preflight. Do not self-select. Do not force-push. ``` WHAT_HAPPENED: Formal APPROVE submitted for PR #919 after code review and tests. WHY: #689 cohort attachment/refusal criteria met; fail-closed parity; scope clean. ISSUE: #689 HEAD_SHA: a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc REVIEW_STATUS: approved / approval_at_current_head MERGE_READY: true BLOCKERS: none VALIDATION: pytest tests/test_issue_689_deterministic_cohort_attachment.py → 9 passed; reviewer approved at head a947bdc186c53f57ffa2d3cdb5b3a07c22b2acbc NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; tool=gitea_submit_pr_review LAST_UPDATED_BY: sysadmin / prgs-reviewer
This pull request has changes conflicting with the target branch.
  • mcp_namespace_health.py
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/issue-689-deterministic-mcp-namespace:fix/issue-689-deterministic-mcp-namespace
git checkout fix/issue-689-deterministic-mcp-namespace
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#919