Repository navigation
feat(observe): preserve complete conversations within the extraction budget - #512
Merged
loveRhythm1990 merged 2 commits intoNov 22, 2026
Conversation
Open
8 of 9 tasks
loveRhythm1990
marked this pull request as ready for review
November 22, 2026 18:07
loveRhythm1990
requested review from
XuPeng-SH,
aptend and
gouhongshen
as code owners
November 22, 2026 18:07
Contributor
|
This pull request is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/completefor 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/standalonefor 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.