Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Resolve merge conflicts for UCNS backend PR - #109

Merged
erinepshovel-code merged 2 commits into
codex/examine-skill-lib-and-create-new-backend-salmqvfrom
codex/github-mention-introduce-ucns-only-backend-edcmbone-backen
Jun 26, 2026
Merged

erinepshovel-code merged 2 commits into
codex/examine-skill-lib-and-create-new-backend-salmqvfrom
codex/github-mention-introduce-ucns-only-backend-edcmbone-backen

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Collaborator

Motivation

  • Finish integrating upstream changes into the UCNS-only backend while preserving the PR's intent to provide a minimal, UCNS-backed edcmbone-backend and to retain the prior backend as an archive.
  • Preserve reviewer fixes that address logical bugs in unresolved-text handling and make the subprocess isolation test less flaky across CI environments.
  • Keep the packaged UCNS engine alongside an accepted compatibility shim so the backend can be installed as a self-contained package.

Description

  • Resolve content conflicts in backend/src/edcmbone_backend/__init__.py so make_boundary() coerces unresolved with _coerce_text() before choosing the UCNS face bit, and merge_boundaries() composes a merged unresolved string from left.hmmm.unresolved and right.hmmm.unresolved only (avoiding concatenation of fallback hmmm: strings).
  • Update the backend tests (backend/tests/test_backend_contracts.py) to assert import-hygiene with set(imports) == {"ucns"} and to run the subprocess isolation test with env={**os.environ, "PYTHONPATH": ...} so only PYTHONPATH is overridden.
  • Accept and add the upstream UCNS engine compatibility file (backend/src/ucns/ucns_v04.py) while keeping the repo-packaged backend/src/ucns layout so the wheel can include the UCNS implementation.
  • Reconcile generated manifest/readme/packaging text (CLAUDE.md / backend/pyproject.toml / backend/README.md) to reflect the packaged edcmbone-backend layout and the resolved runtime notes.

Testing

  • Ran the backend contract tests with PYTHONPATH=backend/src python -m pytest backend/tests, which collected and ran 7 tests and all passed (7 passed).
  • Running python -m pytest backend/tests without an editable backend on PYTHONPATH failed at import time because the installable package was not present in the current environment (expected in local checkouts unless PYTHONPATH or an editable install is used).

Codex Task

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

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

return f"AnchorPayload(theta={self.theta}, payload={self.payload!r})"


class UCNSObject:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Re-export UCNS types instead of redefining them

In an installed backend package, importing both ucns and the new compatibility module ucns.ucns_v04 now creates two independent UCNSObject classes because this file redefines the engine instead of re-exporting the package implementation. That makes structurally identical objects fail interoperability checks such as ucns.unit_obj().equivalent(ucns.ucns_v04.unit_obj()), since equivalent() uses isinstance(other, UCNSObject). For a compatibility shim, ucns.ucns_v04 should expose the same objects as ucns, otherwise consumers that use the historical module path cannot safely compare or compose with backend-created UCNS objects.

Useful? React with 👍 / 👎.


def merge_boundaries(left, right):
"""Compose two boundaries while preserving both delivered and hmmm text."""
unresolved = "\n".join(text for text in (left.hmmm.unresolved, right.hmmm.unresolved) if text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve note-only hmmm records when merging

When callers use the exported Hmmm/BoundaryObject API to carry continuation text in note with no unresolved value, this line drops that text during composition and replaces it with a fresh default fallback. For example, merging a boundary containing Hmmm(note="custom carry-forward") produces a merged hmmm whose text is the default kettle note, so merge_boundaries() no longer preserves both hmmm records in this supported input shape.

Useful? React with 👍 / 👎.

…into codex/github-mention-introduce-ucns-only-backend-edcmbone-backen
@erinepshovel-code
erinepshovel-code merged commit c55aa04 into codex/examine-skill-lib-and-create-new-backend-salmqv Jun 26, 2026
1 of 2 checks passed
@erinepshovel-code
erinepshovel-code deleted the codex/github-mention-introduce-ucns-only-backend-edcmbone-backen branch June 26, 2026 04:53

@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: 9294c26c2e

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

result = subprocess.run(
[sys.executable, "-c", code],
cwd=tmp_path,
env={**os.environ, "PYTHONPATH": str(Path(__file__).resolve().parents[1] / "src")},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the duplicate env keyword

This new env= argument duplicates the existing env=env just below it, so Python raises SyntaxError: keyword argument repeated: env while importing this test module. In any environment that runs or even collects backend/tests/test_backend_contracts.py, the backend test suite now fails before executing any tests; keep only one env argument.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant