fix(agentic): prepared pack + effective Flash views - #306
Merged
Conversation
Close quality ultragoal Q1′ (QD0 / H0b / H0e / H6): prepare pack once, send only bounded triage/extract views to Flash, drop empty signals without a placeholder, broaden path scrub roots, and bump policy_version to agentic_v1.1 for later bulk-retract selection.
9 tasks
This was referenced Aug 7, 2026
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.
Summary
triage_view_text/extract_view_text) from a once-scrubbed pack — never raw capture signal (closes H0b / H0e / QD0).empty_signal(no(empty capture …)placeholder that used to admit and spend)./opt,/private,/Volumes,/mnt,/srv);policy_versionbumped toagentic_v1.1for later bulk-retract selection (QD10).Why
Dogfood and dual review of the agentic quality ultragoal (v2.1) showed substrate defects before prompt work: the runner sent raw signal text to Flash while E5 verified quotes against scrubbed
pack_text, andflash.tssilently sliced to 12k without a declared view contract. Empty captures were substituted with a synthetic admit-worthy string. Quality work on extract prompts cannot fix cite/privacy mismatches if the model and verifier see different strings.This is Q1′ of the quality ultragoal (first code PR after merged Q0 plan). Later gates: do not start Q3′ until Q1.5′ + Q2.5′ green; do not start Q5′ until Q4.5′ green.
Scope and changes
packages/agentic/src/pack.ts—deriveAgenticEffectiveViews, head+tail triage bound (8k), prefix extract bound (12k), broader scrub, digests on prepared packpackages/agentic/src/flash.ts—view_textpath, request-body builders, same-view assert (no second slice)packages/agentic/src/pipeline.ts— stages + verify bind to prepared views; surface view digests on resultpackages/agentic/src/runner.ts— prepare pack before Flash; empty signal no placeholderpackages/agentic/src/types.ts(+ materialize/human-review/index) —AGENTIC_POLICY_VERSION = agentic_v1.1Labels
fixArchitecture/data-contract impact
agentic_v1.1(andformation:agentic_v1.1on materialize reason codes). Historicalagentic_v1holds remain addressable by explicitpolicy_versionon human-review paths.triage_view_text,extract_view_text,effective_view_digest,policy_version). Default operator report still must not dump statements (full redaction is Q1.5′).view_text;pack_textkept as deprecated alias for the same prepared view only.Validation
pnpm --filter @carpeos/agentic testmake preflight-fix/make preflightPublic-data/security boundary
Compatibility/migrations/deployment
policy_versionstamp changes for new agentic materializations (agentic_v1→agentic_v1.1). Gate semantics unchanged (promote-when-verified allowlist).Risks and rollback
policy_version: "agentic_v1"when targeting pre-bump holds; long packs truncate extract to 12k prefix (same as prior Flash slice intent, now declared).Review guide
packages/agentic/src/pack.ts(views + scrub) andpackages/agentic/src/flash.ts(fetch-body bind)runner.tsempty-signal path; pipeline verify onextract_view_textnot raw signalpnpm --filter @carpeos/agentic testOut of scope/follow-ups
Checklist
.github/labels.jsononly