Skip to content

Comments

[cornerstone] Port Faithfulness Fixes#7972

Merged
dglazkov merged 1 commit intomainfrom
cornerstone-clean-up-generate
Feb 23, 2026
Merged

[cornerstone] Port Faithfulness Fixes#7972
dglazkov merged 1 commit intomainfrom
cornerstone-clean-up-generate

Conversation

@dglazkov
Copy link
Collaborator

What

Fixes several port faithfulness
issues found during a side-by-side audit of all six agent functions.

Why

Aligns the Python ports with the
tuned TS behavior.

Changes

opal-backend-shared

  • functions/generate.py — Fixed generate_text to forward thought parts to status callback
    instead of skipping them.
  • functions/image.py — removed invented _INSTRUCTION text (TS has none)
  • functions/video.py — removed invented _INSTRUCTION text
  • functions/audio.py — removed invented _INSTRUCTION text
  • New tests/test_code_gen.py — 16 tests
  • Updated tests/test_generate.py, test_image.py, test_video.py,
    test_audio.py

PROJECT_CORNERSTONE.md

  • Added roadmap items to 4.9: status metadata plumbing, url_context consent
    flow, function group consolidation

Testing

cd packages/opal-backend-shared && source .venv/bin/activate
python -m pytest tests/test_generate.py tests/test_code_gen.py tests/test_image.py tests/test_video.py tests/test_audio.py -v

All 95 tests pass.

## What

Fixes several port faithfulness
issues found during a side-by-side audit of all six agent functions.

## Why

Aligns the Python ports with the
tuned TS behavior.

## Changes

### `opal-backend-shared`

- **`functions/generate.py`** —  Fixed `generate_text` to forward thought parts to status callback
  instead of skipping them.
- **`functions/image.py`** — removed invented `_INSTRUCTION` text (TS has none)
- **`functions/video.py`** — removed invented `_INSTRUCTION` text
- **`functions/audio.py`** — removed invented `_INSTRUCTION` text
- **New** `tests/test_code_gen.py` — 16 tests
- Updated `tests/test_generate.py`, `test_image.py`, `test_video.py`,
  `test_audio.py`

### `PROJECT_CORNERSTONE.md`

- Added roadmap items to 4.9: status metadata plumbing, `url_context` consent
  flow, function group consolidation

## Testing

```bash
cd packages/opal-backend-shared && source .venv/bin/activate
python -m pytest tests/test_generate.py tests/test_code_gen.py tests/test_image.py tests/test_video.py tests/test_audio.py -v
```

All 95 tests pass.
@dglazkov dglazkov enabled auto-merge (squash) February 23, 2026 05:05
@dglazkov dglazkov merged commit 990928a into main Feb 23, 2026
3 checks passed
@dglazkov dglazkov deleted the cornerstone-clean-up-generate branch February 23, 2026 05:08
@github-actions
Copy link

📊 Coverage Report

Metric PR Main Delta
Lines 98.15% 98.15% ⚪ +0.00%
Functions 98.10% 98.10% ⚪ +0.00%
Branches 94.29% 94.29% ⚪ +0.00%

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