[PR #452] [MERGED] fix(beholder): extract one message per run #976

Closed
opened 2026-10-20 17:32:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/452
Author: @GetBeholder
Created: 8/20/2026
Status: ✅ Merged
Merged: 8/20/2026
Merged by: @GetBeholder

Base: staging ← Head: fix/beholder-context-size-one


📝 Commits (1)

  • 663d7db fix(beholder): extract one message per run

📊 Changes

6 files changed (+15 additions, -15 deletions)

View changed files

➕ artifacts/beholder-1.2.2.zip (+0 -0)
📝 catalog/catalog.json (+4 -4)
📝 catalog/v2/catalog.json (+4 -4)
📝 catalog/v3/catalog.json (+4 -4)
📝 packages/beholder/agents.json (+1 -1)
📝 packages/beholder/manifest.json (+2 -2)

📄 Description

Linked issue

Closes #435

Follow-up to #436 — same setting, corrected.

Why this change

contextSize: 2 was my error in #436. I reasoned that since Beholder runs once per assistant turn, the "new content since the last run" is the user message plus the reply, so it should see both.

That is not how the extractor works. The reference implementation hooks user turns and AI messages separately and runs an extraction for each one, against the state the previous extraction left behind. One message in, one delta out. The prompt is written for exactly that — it says to read "the new message", singular, and reports what changed "in this message" — and the tracked state passed alongside already carries everything before it.

Handing it two messages at once is a shape it was neither trained nor evaluated on.

What changed

Package beholder, 1.2.1 → 1.2.2. One default: contextSize 2 → 1. Beholder runs once per assistant turn, so one message per run is the reply that just arrived. maxTokens (4096) and temperature (0) are unchanged, prompts untouched.

Package and security impact

  • Affected package IDs: beholder
  • Engine compatibility impact: none — engine.min stays 2.4.4
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

Known gap, stated plainly

Because the Engine runs this Agent in the post-processing phase, only the assistant turn triggers it. State a user describes solely in their own message — "I take off my coat" with no acknowledgement in the reply — therefore is not extracted, where the reference would have caught it on its user-turn hook. Running the Agent twice per turn would close that, at double the calls; it is not worth it, and it is not what this package should decide unilaterally. Noting it so the trade-off is visible rather than discovered.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Left for a human. Ran and passing: build-agent-catalog.mjs beholder, validate-catalog.mjs (35 packages, lanes v2=35 v3=35), test-catalog-lanes.mjs, validate-package-locales.mjs, npm run check (exit 0), git diff --check. Both prompt templates are byte-identical to 1.2.1 — this is one integer.

Not done: no install through a running Engine.

Same toolchain note as #433 and #436: no system zip available, so the builder ran with a shim delegating to this repository's own scripts/deterministic-zip.mjs; the artifact is store-only rather than deflated. Contents correct, validate-catalog.mjs passes.

Summary by CodeRabbit

  • Updates
    • Updated the Beholder package to version 1.2.2 across supported catalogs.
    • Refreshed package download information and integrity checks.
    • Updated the package manifest to reflect the new release and metadata.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/452 **Author:** [@GetBeholder](https://github.com/GetBeholder) **Created:** 8/20/2026 **Status:** ✅ Merged **Merged:** 8/20/2026 **Merged by:** [@GetBeholder](https://github.com/GetBeholder) **Base:** `staging` ← **Head:** `fix/beholder-context-size-one` --- ### 📝 Commits (1) - [`663d7db`](https://github.com/Pasta-Devs/Marinara-Agents/commit/663d7dbbf4349a1a3632b6eecf65456ed00958a9) fix(beholder): extract one message per run ### 📊 Changes **6 files changed** (+15 additions, -15 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/beholder-1.2.2.zip` (+0 -0) 📝 `catalog/catalog.json` (+4 -4) 📝 `catalog/v2/catalog.json` (+4 -4) 📝 `catalog/v3/catalog.json` (+4 -4) 📝 `packages/beholder/agents.json` (+1 -1) 📝 `packages/beholder/manifest.json` (+2 -2) </details> ### 📄 Description ## Linked issue Closes #435 Follow-up to #436 — same setting, corrected. ## Why this change `contextSize: 2` was my error in #436. I reasoned that since Beholder runs once per assistant turn, the "new content since the last run" is the user message plus the reply, so it should see both. That is not how the extractor works. The reference implementation hooks user turns and AI messages **separately** and runs an extraction for **each one**, against the state the previous extraction left behind. One message in, one delta out. The prompt is written for exactly that — it says to read "the new message", singular, and reports what changed "in this message" — and the tracked state passed alongside already carries everything before it. Handing it two messages at once is a shape it was neither trained nor evaluated on. ## What changed Package `beholder`, `1.2.1` → `1.2.2`. One default: `contextSize` `2` → `1`. Beholder runs once per assistant turn, so one message per run is the reply that just arrived. `maxTokens` (4096) and `temperature` (0) are unchanged, prompts untouched. ## Package and security impact - Affected package IDs: `beholder` - Engine compatibility impact: none — `engine.min` stays `2.4.4` - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ### Known gap, stated plainly Because the Engine runs this Agent in the post-processing phase, only the assistant turn triggers it. State a user describes solely in their **own** message — "I take off my coat" with no acknowledgement in the reply — therefore is not extracted, where the reference would have caught it on its user-turn hook. Running the Agent twice per turn would close that, at double the calls; it is not worth it, and it is not what this package should decide unilaterally. Noting it so the trade-off is visible rather than discovered. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Left for a human. Ran and passing: `build-agent-catalog.mjs beholder`, `validate-catalog.mjs` (35 packages, lanes v2=35 v3=35), `test-catalog-lanes.mjs`, `validate-package-locales.mjs`, `npm run check` (exit 0), `git diff --check`. Both prompt templates are byte-identical to 1.2.1 — this is one integer. Not done: no install through a running Engine. > Same toolchain note as #433 and #436: no system `zip` available, so the builder ran with a shim delegating to this repository's own `scripts/deterministic-zip.mjs`; the artifact is store-only rather than deflated. Contents correct, `validate-catalog.mjs` passes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Updates** - Updated the Beholder package to version 1.2.2 across supported catalogs. - Refreshed package download information and integrity checks. - Updated the package manifest to reflect the new release and metadata. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#976
No description provided.