Skip to content

Claude/coord postmerge cleanup#145

Merged
hyperpolymath merged 6 commits into
mainfrom
claude/coord-postmerge-cleanup
May 24, 2026
Merged

Claude/coord postmerge cleanup#145
hyperpolymath merged 6 commits into
mainfrom
claude/coord-postmerge-cleanup

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Changes

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no TypeScript, no npm/bun, no Go/Python)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • .machine_readable/STATE.a2ml updated (if project state changed)
  • .machine_readable/ECOSYSTEM.a2ml updated (if integrations changed)
  • .machine_readable/META.a2ml updated (if architectural decisions changed)
  • Documentation updated for user-facing changes
  • TOPOLOGY.md updated (if architecture changed)
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (MPL-2.0 / MPL-2.0)
  • ABI/FFI changes validated (src/abi/ and ffi/zig/ consistent)

Testing

Screenshots

claude and others added 6 commits May 24, 2026 04:24
… + PR-workflow note

Post-merge cleanup on top of #142's squash-merge. No behavioural changes —
26/26 bridge tests stay green.

* path-claims: cache segment-split per registered path so the n×m overlap
  scan inside register() stops re-splitting; collapse the O(n²) `//`
  normalisation while-loop into a single `\/+` regex; extract
  DEFAULT_TTL_S so register() and refresh() share one default; normalise
  the paths-array iteration into a small helper.
* dispatcher: split the path-claims interception into explicit
  before/after hooks (pathClaimsBefore strips the bridge-only `paths`
  field before forwarding to the verified backend; pathClaimsAfter
  registers/refreshes/releases against the response), so the dispatch
  function reads as envelope-validate → before-hook → fetch → after-hook.
* coord-hooks.sh: extract _coord_claim_quiet so coord-claim and
  coord-worktree share one parse path and interpret "granted" the same
  way; drop the duplicated python-parse blocks.
* CLAUDE.md: add a "PR Workflow" section documenting the squash-merge +
  follow-up-commit hazard that produced PR #142's ghost-conflict, with
  the empty-diff diagnostic and the post-merge cleanup recipe.
Measures register() (the hot path on coord_claim_task) across realistic
(10 claims) → stress (1000 claims) population sizes, plus the
pathsOverlap leaf primitive and bookkeeping (refresh, list). Bench
holds active-claim count stable by reusing one task slot per iter, so
the reported numbers reflect overlap-scan cost at the seeded
population — not arithmetic-series accumulation.

Reference numbers on dev host: 240k ops/s at 10 claims, 3.9k ops/s at
1000 claims, pathsOverlap ~170 ns/op. Numbers are host-dependent; use
deltas across commits, not absolute values.
Runs node mcp-bridge/tests/path_claims_bench.js on every PR/push that
touches the bridge, uploads the output as an artifact, and posts a
sticky PR comment (marker-tag find-or-update) so bench deltas are
visible inline across pushes instead of buried in the artifact tarball.

Separate job from the existing zig `benchmarks` so the JS bench gets
its own runner (no Zig install) and the logs stay untangled. Per-job
permissions override (pull-requests: write) keeps workflow-level
permissions at read-all — only the comment step needs write.

Comment failure is non-fatal (continue-on-error) so a token hiccup or
fork PR never gates the bench. Same pattern as hypatia-scan's PR
comment step.
…op-gap)

Two short ADRs evaluating the remaining survey gaps so the
implementation pick is made on documented tradeoffs rather than
implementer instinct.

* 0015 — Promote bridge-only path-claims to a backend-enforced lock
  primitive. New P-08 LockSoundness in Idris2 (constructive — segment-
  prefix mutual exclusion is structurally inductive). Closes the
  survey's file-lock gap completely. Cost: 2-4 days, but the first
  non-task-id concept entering the proved backend core.

* 0016 — Cross-host federation stop-gap using mTLS + ed25519, sized
  to match Ruflo's posture. Explicitly positioned as a v1 for the
  ambitious ADR-0010 (DID + ML-DSA-87 + ML-KEM-1024 + federated
  quarantine), not a replacement. Loopback bus and Idris2 ABI
  untouched; cost: 4-6 days; trust bootstrap stays manual on purpose
  (SSH known_hosts model).

Both end with a recommendation block. Verdict: 0016 closes the more
user-visible gap and carries lower architectural risk; 0015 is the
strongest technical answer but only worth it if "advisory warning is
not enough" is a stated requirement.
User picked 0016 over 0015 after reviewing both spikes. Flip status
fields to match:

* 0016 — Accepted with a 6-phase implementation plan (identity →
  sign/verify → mTLS transport → coord tools → Idris2 Federation.idr
  → tests). Each phase its own PR off main after this ADR lands.
  Total estimated 4-6 days.
* 0015 — Deferred. Stays on file as the design-of-record for a
  backend-enforced lock primitive should the bridge-layer advisory
  layer prove insufficient. Reopen by flipping to "Proposed".
@github-actions
Copy link
Copy Markdown

🏁 path-claims bench

Commit 44b6d69

Numbers
path-claims bench  (node v22.22.3)

  scenario                                              iters       ms        ns/op          ops/s
  --------------------------------------------------------------------------------------------------------------
  register: 10 active claims, 3 new paths               50000 iters    178 ms      3.56 µs/op    280.8k ops/s
  register: 100 active claims, 3 new paths              20000 iters    319 ms     15.95 µs/op     62.7k ops/s
  register: 1000 active claims, 3 new paths              5000 iters    996 ms    199.24 µs/op      5.0k ops/s
  register: 100 active claims, 20 new paths              5000 iters    374 ms     74.89 µs/op     13.4k ops/s

  pathsOverlap: deep diverge at segment 4             1000000 iters    158 ms     158.5 ns/op     6.31M ops/s
  pathsOverlap: short prefix match                    1000000 iters    136 ms     136.3 ns/op     7.34M ops/s

  refresh (existing claim)                             100000 iters     10 ms     104.0 ns/op     9.61M ops/s
  list (100 active claims)                              50000 iters    291 ms      5.83 µs/op    171.4k ops/s

  (Bench numbers depend on host; use deltas across commits, not absolute values.)

Host-dependent — compare deltas across commits, not absolute values.

@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 125 issues detected

Severity Count
🔴 Critical 18
🟠 High 69
🟡 Medium 38

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stale AI session file -- delete",
    "type": "stale",
    "file": "GEMINI.md",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "medium"
  },
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/sanctify-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/academic-workflow-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/fireflag-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/ephapax-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/bofig-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/hesiod-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath merged commit 2dff04d into main May 24, 2026
19 checks passed
@hyperpolymath hyperpolymath deleted the claude/coord-postmerge-cleanup branch May 24, 2026 05:57
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