Skip to content

[Bridge surgery] flock + bridge package + readiness doc#1

Open
JosephOIbrahim wants to merge 1 commit into
mainfrom
claude/audit-moneta-api-nvUfG
Open

[Bridge surgery] flock + bridge package + readiness doc#1
JosephOIbrahim wants to merge 1 commit into
mainfrom
claude/audit-moneta-api-nvUfG

Conversation

@JosephOIbrahim
Copy link
Copy Markdown
Owner

Five MoE roles converged on bridge-readiness work directed by Joseph:

  • Substrate Engineer: stdlib fcntl cross-process lockfile in
    Moneta.init (POSIX-only, opt-in via snapshot_path; lockfile
    at snapshot_path.with_suffix('.lock')). Released in close()
    before _ACTIVE_URIS discard. Hardens the in-process registry
    against multi-process corruption flagged in the audit.

  • USD Engineer: codeless CozyRoom + CozyMemory schema at
    bridge/schema/ for Comfy-Cozy session emissions. UUID-based
    prim paths (substrate convention [Bridge surgery] flock + bridge package + readiness doc #1). embeddingHint contract
    documented (empty = bridge embeds; non-empty length must match
    embedder dim).

  • Bridge Engineer: bridge/ package skeleton with Embedder
    Protocol + SentenceTransformersEmbedder default
    (all-MiniLM-L6-v2, 384-dim, normalize_embeddings=True). Lazy
    sentence-transformers import so the module is importable
    without the dep.

  • Documentarian: promoted bridge readiness assessment from
    /root/.claude/plans/ into docs/bridge-readiness.md. Flagged
    CLAUDE.md drift (says v1.0.0; pyproject says v1.2.0rc1) for a
    follow-up pass.

  • Test Engineer: 5 adversarial flock tests (in-process collision,
    cross-process block, release-on-close, ephemeral no-flock,
    lockfile-path), all POSIX-skipped on win32. 6 embedder tests
    (one verifies lazy-import without sentence-transformers; five
    use importorskip for the live model).

Verification: 75 unit + 22 integration green (97 total, 4 skipped
on pxr unavailability — unchanged). smoke_check passes. Ruff
delta on api.py: 17 -> 18 errors (one Optional[Any] matching
codebase convention; B904 fix pre-empted a +2 delta).

Net new: bridge/ package, docs/bridge-readiness.md,
tests/unit/test_api_flock.py, +63 lines src/moneta/api.py.

https://claude.ai/code/session_01WhWjg9f9D6X76tDiZCvj1p

Five MoE roles converged on bridge-readiness work directed by Joseph:

- Substrate Engineer: stdlib fcntl cross-process lockfile in
  Moneta.__init__ (POSIX-only, opt-in via snapshot_path; lockfile
  at snapshot_path.with_suffix('.lock')). Released in close()
  before _ACTIVE_URIS discard. Hardens the in-process registry
  against multi-process corruption flagged in the audit.

- USD Engineer: codeless CozyRoom + CozyMemory schema at
  bridge/schema/ for Comfy-Cozy session emissions. UUID-based
  prim paths (substrate convention #1). embeddingHint contract
  documented (empty = bridge embeds; non-empty length must match
  embedder dim).

- Bridge Engineer: bridge/ package skeleton with Embedder
  Protocol + SentenceTransformersEmbedder default
  (all-MiniLM-L6-v2, 384-dim, normalize_embeddings=True). Lazy
  sentence-transformers import so the module is importable
  without the dep.

- Documentarian: promoted bridge readiness assessment from
  /root/.claude/plans/ into docs/bridge-readiness.md. Flagged
  CLAUDE.md drift (says v1.0.0; pyproject says v1.2.0rc1) for a
  follow-up pass.

- Test Engineer: 5 adversarial flock tests (in-process collision,
  cross-process block, release-on-close, ephemeral no-flock,
  lockfile-path), all POSIX-skipped on win32. 6 embedder tests
  (one verifies lazy-import without sentence-transformers; five
  use importorskip for the live model).

Verification: 75 unit + 22 integration green (97 total, 4 skipped
on pxr unavailability — unchanged). smoke_check passes. Ruff
delta on api.py: 17 -> 18 errors (one Optional[Any] matching
codebase convention; B904 fix pre-empted a +2 delta).

Net new: bridge/ package, docs/bridge-readiness.md,
tests/unit/test_api_flock.py, +63 lines src/moneta/api.py.

https://claude.ai/code/session_01WhWjg9f9D6X76tDiZCvj1p
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Warning

Rate limit exceeded

@JosephOIbrahim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 49 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e42702e1-ee60-47b0-8d16-ada1eec7f306

📥 Commits

Reviewing files that changed from the base of the PR and between 9a46293 and 24dc152.

📒 Files selected for processing (12)
  • .gitignore
  • bridge/README.md
  • bridge/moneta_bridge/__init__.py
  • bridge/moneta_bridge/embedder.py
  • bridge/pyproject.toml
  • bridge/schema/CozySchema.usda
  • bridge/schema/plugInfo.json
  • bridge/tests/__init__.py
  • bridge/tests/test_embedder.py
  • docs/bridge-readiness.md
  • src/moneta/api.py
  • tests/unit/test_api_flock.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/audit-moneta-api-nvUfG

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 27 minutes and 49 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

JosephOIbrahim pushed a commit that referenced this pull request May 5, 2026
Four-item state-of-union followup:

1. docs/api.md — full rewrite for the v1.1.0+ handle API. The previous
   text described the deleted singleton API (moneta.init(),
   module-level moneta.deposit(...), MonetaNotInitializedError,
   PROTECTED_QUOTA=100 module constant). Replaced with: handle
   construction via Moneta(MonetaConfig), context-manager pattern,
   per-handle quota_override, multi-instance section, current error
   classes (MonetaResourceLockedError, ProtectedQuotaExceededError),
   runtime requirements section.

2. README.md test counts — bumped 107 → 109 (plain Python) and
   147 → 149 (hython total). Drift since the free-threading guard
   tests landed in 76da067. Historical surgery-table number (94 → 107
   delta column) left intact.

3. docs/patent-evidence/README.md — split into "claim-substantiating
   evidence" (Pass 5 + Pass 6, mapping to claims #4 and #3) and
   "implementation maturity evidence" (v1.1.0 TOCTOU 480-attempt,
   v1.2.0-rc1 codeless schema acceptance gate, free-threading guard).
   Added explicit claims-evidence gap analysis: claims #1 (LIVRPS
   decay priority) and #2 (variant LOD for fidelity) lack dated
   entries; claim #3 has only Pass 6 secondary mention. Added "how to
   add a new entry" section codifying date / claim mapping / prior
   art / reproducibility requirements.

4. CLAUDE.md hard rules — surfaced the free-threading limitation as
   an explicit hard rule (was source-only in attention_log.py
   docstring). Bumped stale "94 existing Phase 1 tests" reference to
   the current 109 plain / 149 hython numbers.

No code changed. No tests added or removed. The four locked decisions
in the spec remain untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JosephOIbrahim pushed a commit that referenced this pull request May 5, 2026
Six updates that bring the README current with reality post the
documentarian-debt followup:

1. Status table — added free-threading guard row (commit 76da067).
   Module-level surgical addition, not a tagged version, but worth
   surfacing so the entry isn't only visible by reading source.

2. Locked decisions §3 (concurrency primitive) — appended GIL-required
   clause. The lock-free swap-and-drain correctness argument depends
   on the GIL; AttentionLog.__init__ raises under PEP 703. Forward
   work tracked via §9 Trigger 2.

3. Project structure tests/ block — added test_attention_log_gil_guard.py
   line. Math now reconciles to 109 plain Python (70 unit + 22 integration
   + 2 load + 3 twin + 10 twin-adversarial + 2 gil-guard).

4. Lineage paragraph — appended free-threading guard step + this
   documentarian followup (commit 6cb1fd1) so the timeline stays
   complete through the present.

5. System overview mermaid — annotated AttentionLog node with
   "GIL-required · PEP 703 sentinel" so the architecture diagram
   surfaces the runtime contract, not just the structural one.

6. NEW mermaid diagram — claim → evidence map next to the Novelty
   claims section. Visualizes the gap analysis from the patent-evidence
   README: claims #3 and #4 have direct evidence; claims #1 and #2
   have dated-entry gaps; implementation maturity evidence (v1.1.0,
   v1.2.0-rc1, free-threading guard) is shown as auxiliary not
   claim-substantiating. Same two-color palette as the other 8
   diagrams.

No code changed. Test suite untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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