feat(doctor): per-trigger flow-tier resolution lines - #191
Merged
Conversation
The doctor half of issue #189 Gap 1 (the runner half merged as #190): one line per distinct (flow, folder, skillsDir, packages) question, naming the skill tier that resolves the trigger's run.flow, probed in the loader's own precedence order. The repo tier reuses the flow gate's ls-tree mechanics (100644-blob rule, hardened git flags) but deliberately NOT readFlowGate itself: the gate's fail-closed catch turns a broken folder into deny, and deny-implies-exists would print a confident wrong answer on an advisory line; its no-ref rule guards against an agent self-authorizing, which a host-side preflight does not face, so doctor resolves HEAD itself and degrades to unknown. The staged tier gets the genuinely new reader, readStagedSkills in worker/src/packages.mjs (never-throws, reachable by admin for issue #188's topology): it mirrors pi's manifest-vs-convention rule at the 0.80.7 pin, including that a pi manifest WITHOUT a skills key contributes nothing, and declares a pattern-carrying manifest not-enumerable rather than guessing, because patterns can also disable files and a wrong checkmark is the one direction an advisory line may not err in. When nothing resolves the line is a warn, never a fail and never a fixAction (triggers content is the never tier), naming the tiers checked and the ones not checkable on this host: a forge trigger's repo is not here, and mid-setup is legal. Staged-package-only resolution is a plain checkmark naming the package, per the issue's acceptance. A flow failing the skill charset is its own warn. Zero triggers add zero lines; the two package-feature no-op pins keep their broad needle by stripping the flow lines, which name staged packages as a tier. Specs: REQ-PER-TRIGGER-SKILLS AMENDED (the doctor acceptance clause), REQ-GLOBAL-PI-OVERLAY AMENDED (overlay + staged tiers join doctor's obligations), DES-FLOW-RESOLUTION-TWO-ADVISORY-LAYERS AMENDED (the doctor layer specified in full, readFlowGate rejection recorded). UNCHANGED, checked: REQ-DEPLOYMENT-BOOTSTRAP (warn-tier, no fixAction), INT-TRIGGERS-FILE-CONTRACT, INT-CONTAINER-JOB-INPUTS, INT-PI-PACKAGES-FILE-CONTRACT, DES-AI-TRIGGER-FLOW-GATE, DES-CLI-SURFACE. Signed-off-by: Rob Boerman <robboerman@live.nl>
This was referenced Aug 13, 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.
The doctor half of #189 Gap 1 (the runner half merged as #190). Doctor now answers, per trigger, whether
run.flowresolves in any host-visible skill tier, before the trigger fires.What
.pi/skillsat HEAD (cron folders), injectedrun.skillsDir, overlayskills/, staged packages.readFlowGateitself: the gate's fail-closed catch would turn a broken folder into a confident wrong ✓, and its no-ref rule guards against an agent a host preflight does not have. Doctor resolves HEAD itself and degrades to unknown.readStagedSkillsinworker/src/packages.mjs(never-throws; importable by admin for Topology: flows resolved from injected, overlay or staged-package skills render as missing #188's topology): mirrors pi's manifest-vs-convention rule at the pin, including that apimanifest without askillskey contributes nothing, and declares pattern-carrying manifests not-enumerable rather than guessing (patterns can also disable files; a wrong ✓ is the one inadmissible direction).flow_not_loaded, feat(runner): report a run.flow that resolves in no loaded skill tier #190) so the two advisory layers reference each other.Specs
REQ-PER-TRIGGER-SKILLSAMENDED (doctor acceptance clause),REQ-GLOBAL-PI-OVERLAYAMENDED (overlay + staged tiers join doctor's obligations),DES-FLOW-RESOLUTION-TWO-ADVISORY-LAYERSAMENDED (doctor layer specified in full,readFlowGaterejection recorded). UNCHANGED, checked:REQ-DEPLOYMENT-BOOTSTRAP(warn-tier, no fixAction),INT-TRIGGERS-FILE-CONTRACT,INT-CONTAINER-JOB-INPUTS,INT-PI-PACKAGES-FILE-CONTRACT,DES-AI-TRIGGER-FLOW-GATE,DES-CLI-SURFACE.Suite: 2219 tests, 0 failed, 0 skipped, in the CI posture (loader/worker/receiver gates on, live Valkey).