Skip to content

Codex/commercial v1 ga#30

Closed
Coding-Dev-Tools wants to merge 14 commits into
mainfrom
codex/commercial-v1-ga
Closed

Codex/commercial v1 ga#30
Coding-Dev-Tools wants to merge 14 commits into
mainfrom
codex/commercial-v1-ga

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Description

Type

  • Bug fix
  • New feature
  • Documentation
  • CI/CD

Verification

  • python -m pytest tests/ -q passes
  • ruff check . passes
  • python -m eval.harness --dataset eval/datasets/sample.jsonl --k 5 passes

Coding-Dev-Tools and others added 14 commits July 20, 2026 00:39
- Externalize inline styles in dashboard (s197/s198) for strict CSP
- Harden metadata cleaning to prevent LLM activity forgery
- Add timeout-minutes to CI/release workflow jobs
- Remove temp measurement scripts from repo root
- Add Playwright E2E test infrastructure
- Update SECURITY.md with current disclosure policy
- Add .env.example entries for new config options
- Update .gitignore for Playwright artifacts

Audit lanes: Verify (1573 tests pass), FrontDocs (CSP clean),
CICDInfra (SHA-pinned actions), APIRoutes (webhook sigs robust),
CommBill (idempotency sound), CoreEngine (CRDT correct).
SecAuth inline-verified: HMAC-SHA256 constant-time on all webhook
surfaces, deployment token separation, role enforcement, cookie
security, path traversal guards, service_mode isolation.
- Build loopback origin from server bound port, never client Host
- Add test for forged Host via loopback reverse proxy
- Remove npm cache directive (no package-lock.json)
- Add uvicorn[standard] to CI/release pip install
@Coding-Dev-Tools

Copy link
Copy Markdown
Owner Author

Closing: this branch is fully redundant with main. Its content (commercial-v1-ga sync + CI skip fix) was already merged via PRs #24 and #27. The diff against current main shows only deletions of already-merged code. No unique changes remain.

Coding-Dev-Tools added a commit that referenced this pull request Jul 21, 2026
…ts (#34)

* chore: restore soft-close edge dedup, drop dead billing dispatch, dedup test fixture

- service.py merge_workspaces(): replace the hard DELETE on colliding live
  edges with the bi-temporal soft-close used elsewhere in the codebase
  (Store._deduplicate_live_edges): merge weight/provenance/valid_from/
  ingested_at and live edge_supports onto the surviving edge, then close the
  losing edge with valid_to+expired_at and a canonical_deduplicated_into
  provenance marker instead of deleting it. Ported from the validated
  closed-PR #30 (codex/commercial-v1-ga) implementation. Drops the now-orphaned
  _dumps import (its only call site was the removed hard-delete path).
- tests/test_workspace_ops.py: update
  test_merge_deduplicates_colliding_live_edges to assert soft-close semantics
  (losing edge still present with valid_to/expired_at set and the
  canonical_deduplicated_into marker pointing at the survivor) instead of
  asserting the row is gone.
- billing.py: remove polar_webhook()'s unreachable second refund/revoke
  dispatch (order.refunded / subscription.revoked / subscription.updated
  status==revoked) — the _REVOKING_EVENTS guard earlier in the function
  always returns first, so this code never ran. Also removes the
  now-fully-unused _revoke_refunded_order, _revoke_subscription_event,
  _polar_subscription_id and _polar_order_id (confirmed zero other
  callers/uses repo-wide via grep before deleting).
- tests/test_billing.py: remove the duplicate def _registry_rows() (two
  byte-identical definitions; Python silently kept only the second).

Validated: ruff check . clean; pytest tests/ 1605 passed, 14 skipped, 0
failed (identical to unmodified origin/main in this environment, confirming
no regressions).

* fix: avoid IntegrityError when moving colliding edge_supports in merge_workspaces

The soft-close support move (UPDATE edge_supports SET edge_id=...) was a plain
UPDATE. idx_edge_support_live_unique is a partial unique index on
(edge_id, memory_id, source_kind) WHERE live, so if the surviving target edge
already had a live support for the same memory (same memory_id + source_kind),
retargeting the source edge's identical live support onto it violated the
index and raised sqlite3.IntegrityError, rolling back the whole merge
transaction. Main's prior hard-delete code guarded against this with
UPDATE OR IGNORE; the soft-close port dropped that safeguard.

Fix: use UPDATE OR IGNORE for the move (matches main's original convention),
then soft-close (valid_to+expired_at) whatever live support OR IGNORE left
behind on the source edge, so nothing stays live on a now-closed edge --
mirroring how Store._deduplicate_live_edges() closes retired supports.

Added test_merge_deduplicates_colliding_live_edges_with_colliding_support to
tests/test_workspace_ops.py: both workspaces' colliding edges are backed by
the same memory id, so the support move itself collides. Verified this test
fails with the exact predicted IntegrityError against the pre-fix code and
passes against the fix.
@Coding-Dev-Tools
Coding-Dev-Tools deleted the codex/commercial-v1-ga branch July 21, 2026 13:26
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.

1 participant