Repository navigation
perf(publication): reuse public presentation verdicts between changes - #946
Draft
Haoming9527 wants to merge 2 commits into
Draft
Haoming9527 wants to merge 2 commits into
Haoming9527 wants to merge 2 commits into
Conversation
This was referenced Nov 14, 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.
Refs #872. Stacked on #945 (
work/872-scan-metadata).What was wrong
Every admitted PTC loader callback assembled the entire public prompt again to obtain a presentation boolean. With ten callbacks in one step, the real host fixture performed 12 assemblies (11 probes). Native/discovery callbacks and result admission also repeated this inspection.
The change
Cache the final public probe verdict by prompt service and exact agent identity. Owned public prompt/tool change listeners invalidate all verdicts; disposal removes reuse, unobserved deployments fall back to a fresh probe, and invalidated asynchronous probes cannot authorize execution or overwrite a newer verdict. Callbacks retain live scope/definition/grant checks and compare the revision across asynchronous admission. No private executor API, dependency, schema, output limit or permission contract changes.
Includes bilingual documentation, changelog, three cache regressions, a real-host ten-callback regression, reproducible benchmark and every warmup/measured sample with source hashes.
Validation
npm run build: passed.git diff --checkand source-size gate: passed.This is a publication benchmark with real host services and a resident fixture that rejects execution. It excludes worker work, run_code compilation, shell and model requests. The full 106-operation scenario, full orchestration SLO and shell performance acceptance remain unmeasured or unmet. This PR does not close #872 or authorize a runtime release.
Pull-request-triggered CI: https://github.com/T-Auto/dsh-ops/actions/runs/43613610235 — all 10 jobs passed, including CI required and the Windows/Linux/macOS full release gates. The first run exposed a stale test assumption: ptc.test waited for an assembly despite a valid cache. The race fixture now explicitly invalidates the cache and fails if execution bypasses its barrier. The full PTC suite passes locally with normal staged-worker resolution; the assertion that an executor change prevents worker dispatch remains intact.
Environment
Windows x64 10.0.26300, Ryzen 7 6800HS, Node 26.12.1, locked dependencies. Base #945 at
9a626c16fe64e092bf25b8269073d15248e1628c; before host source is #944 at24ac360551c1336453b78268090574f97a1de50a(unchanged by #945). No merge, tag or release.