Skip to content

feat(observe): preserve complete conversations within the extraction budget - #512

Merged
loveRhythm1990 merged 2 commits into
matrixorigin:mainfrom
loveRhythm1990:fix/grouped-observe-evidence-1212
Nov 22, 2026
Merged

loveRhythm1990 merged 2 commits into
matrixorigin:mainfrom
loveRhythm1990:fix/grouped-observe-evidence-1212

Conversation

@loveRhythm1990

@loveRhythm1990 loveRhythm1990 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Background

Astra can keep an acknowledged user correction and its earlier context in one raw memory. The regular observer shortens each message to 500 Unicode characters for model extraction. A correction near the end of a longer record would therefore be visible to raw storage but invisible to the extractor.

Change

Add POST /v1/observe/complete for clients that require full evidence. The endpoint accepts up to 20 public user or assistant messages within the existing 6,000-byte formatted extraction budget. It rejects incomplete or oversized input before writing. Model extraction, raw fallback, authenticated ownership, branch handling and exclusion processing share the regular observer implementation.

Add POST /v1/observe/standalone for acknowledged user guidance separated from its original context by tool use. It takes one bounded user message. An extractor evaluates whether it stands alone. A stored candidate must match the entire original text, including any qualification. Missing or unavailable extraction returns 503. No raw fallback is possible in this mode.

Existing clients continue using the regular route. On older servers the new route is unavailable. Clients requiring complete input should not retry against the regular route.

Verification

The HTTP integration test uses MatrixOne and owner-scoped authentication. A scripted extractor matches a correction beyond character 500. With no model configured, the complete record is read back from storage. The test also checks that an oversized request and a tool message are rejected before storage. The scope test covers read-only credentials.

The standalone API tests use scoped ownership and read back the stored records. They cover an explicit preference, a fabricated interpretation of an indirect reference, a confirmation, a quote taken out of its negation, and an absent extractor. Four local public Astra Run journeys also exercised these endpoints on MatrixOne 4.2.8, including raw fallback on the complete route.

Companion to matrixorigin/Astra#1212. The default Astra image pin still needs a published Memoria build.

@loveRhythm1990
loveRhythm1990 marked this pull request as ready for review November 22, 2026 18:07
@mergify

mergify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@loveRhythm1990
loveRhythm1990 merged commit 6cb56fc into matrixorigin:main Nov 22, 2026
7 checks passed
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