Repository navigation
Conversation
Fleet review (deepseek)Lens: evidence + test design. Reviewed #446 at head d9d6743 and verified each claim against the source at that head, not only against the diff. Both blocking findings of #409 are addressed: an evidence-file read failure now prints stage=evidence_admission before its evidence_field/evidence_reason line (internal/cli/doctor.go:360-373), and an install-root resolution failure prints stage=actor_admission (doctor.go:381-386). The routed pair was already escaped on the base and doctor.go:419-421 passes Provider and Model through sanitizeRouteIdentity -> escapeDiagnosticText, which renders every byte outside printable ASCII (and the backslash itself) as \xNN; that matches the new hostile-route expectation byte for byte, so the PR correctly adds only a regression test for it. The new tests are consistent with the implementation rather than merely written to it: readQAFile (doctor.go:624-643) returns a bare fmt.Errorf and never wraps os.ErrNotExist, so a missing path lands in the file_unavailable branch, a directory in not_a_file, and an oversized file in exceeds_size; qaInstallRoot fails when HOME is unset because skillroot.ResolveSystemUninstallRoots calls os.UserHomeDir (internal/skillroot/resolve.go:157-162), which is exactly what the install-root test unsets; and qaReportNote contains no stage= token, so the Count(stderr, "stage=") == 1 assertion is meaningful. No blocking finding. The remaining notes are about the one quoted reason that differs from #409's example, two earlier refusals that still print no stage, and one unasserted detail line in the oversized case. Suggestion (2)
Question (1)
Verdict: ready to merge |
Fleet review (glmflash)Lens: adversarial. The PR fixes both blocking findings of correction issue #409 against the diff at head d9d6743. Criterion 1 (early refusals print no stage): verified in the head's internal/cli/doctor.go — the evidence read failure prints stage=evidence_admission before the evidence_field/evidence_reason lines (doctor.go:362) and the install-root failure prints stage=actor_admission before returning (doctor.go:384); new regressions in qa_test.go cover missing, directory, oversized evidence and the unset-HOME install-root path, each asserting exactly one stage line, failure exit, empty stdout, and no backend launch. Criterion 2 (raw route identity vs documented escaping): verified that doctor.go:420 at the head writes route_provider/route_model through sanitizeRouteIdentity (which delegates to escapeDiagnosticText, doctor.go:481-487), so the documented escaping holds on the current base without a production change, exactly as the PR body claims, and the new TestQARunModelRefusalEscapesProfileRouteIdentity pins the hostile OSC-52/newline/backslash cases with an assertion that no raw control byte reaches stderr. Docs changes in docs/operating.md accurately describe both newly named paths. Exact-head CI (run 45307126360) passed, including the full race suite. One residual gap found adversarially, filed as a question because the correction criteria do not name it and the four-stage vocabulary has no entry that fits: the request-file read failure path still returns before the stage block without a stage. Suggestion (1)
Question (1)
Verdict: ready to merge |
Fleet review (qwen38)Lens: evidence. Reviewed #446 at head d9d6743 (83 changed lines: docs/operating.md, internal/cli/doctor.go, internal/cli/qa_test.go) against correction issue #409. Both blocking criteria are met with verifiable evidence. AC1 (early refusals print a stage): the head source emits stage=evidence_admission before the evidence field lines and stage=actor_admission on the install-root failure, and regression tests pin the exact stderr prefix, exit status, empty stdout, single stage line, and no backend launch for missing, directory, oversized evidence and unset HOME. AC2 (escaped route identity): confirmed against the base itself — sanitizeRouteIdentity already wraps route_provider/route_model at base f84fb20 (doctor.go:417), so the #409 finding against the older head is resolved; the PR adds an honest regression test that feeds an OSC 52 / newline / title-rewrite route pair and asserts no raw control bytes remain, and the PR body correctly states this test passed on base rather than claiming a production fix. The CI claim was verified by inspecting the exact-head runs: CI run 45307126360 (success) contains go vet, go test ./..., go test -race ./... and all three Python policy suites in its single job, plus three successful PR validation runs. One evidence gap noted below: the file_not_found reason branch is unreachable and the issued acceptance-criterion text quotes a reason the shipped behavior does not produce, which the PR acknowledges and explains but leaves as a definitional ambiguity rather than a defect. Suggestion (1)
Question (1)
Verdict: ready to merge |
Fleet review (glm)Lens: requirements + adversarial. Both blocking scenarios from issue #409 are fixed at this head: the early evidence read failure now prints stage=evidence_admission before the evidence_field/evidence_reason lines (internal/cli/doctor.go:362), and the install-root resolution failure now prints stage=actor_admission (internal/cli/doctor.go:384); error codes, note line, and ordering match the pipeline-classified path, and the new tests assert exact prefixes, single stage occurrence, empty stdout, failure exit, and no backend launch. The route-identity escaping required by the second criterion is present at head (internal/cli/doctor.go:420 routes Provider/Model through sanitizeRouteIdentity -> escapeDiagnosticText) and the new regression genuinely injects raw OSC-52/ESC/BEL/CR/backslash bytes through a caller-owned profile and asserts the escaped rendering plus absence of raw control bytes, so that criterion no longer reproduces either. Doc updates at docs/operating.md:255-264 match the implemented behavior, including the install-root extension of actor_admission and read-failure coverage of evidence_admission. Remaining findings are non-blocking: the criterion-1 example output names evidence_reason=file_not_found, but a missing evidence file actually reports file_unavailable because the bounded reader discards the stat error (documented in the PR body, with the file-reader change declared out of scope); the os.IsNotExist branch that would print file_not_found is unreachable dead code; and request-task/cwd/catalog resolution failures still refuse with no stage, which is the same ambiguity class but outside the issue's two named scenarios and the fixed four-stage vocabulary. Process note: issue #409 asked for fixes on branch fix/qa-refusal-profile, but source PR #407 was already merged, so a new branch/PR is a reasonable delivery; the PR closes the correction issue. Suggestion (1)
Question (2)
Verdict: ready to merge |
Fleet review (mimo)Lens: requirements. Both acceptance criteria of issue #409 are satisfied at head d9d6743: (1) the two early refusals now print their stage before returning (internal/cli/doctor.go:362 evidence_admission, doctor.go:384 actor_admission) and both new regression tests assert exactly the stage-plus-fields output; (2) route_provider/route_model are escaped on this head via sanitizeRouteIdentity (doctor.go:420, helper at doctor.go:477), which I verified against the reviewed head's file content, and the new hostile-route test asserts no raw ESC/BEL/CR reaches stderr. The diff does not contradict any explicit criterion, so no blocking findings. Remaining items are an ambiguity in the criterion's quoted reason token and two out-of-scope refusals worth clarifying. Suggestion (1)
Question (2)
Verdict: ready to merge |
Linked Issue
Closes #409
PR Type
type:featureFeaturetype:bugBug fixtype:docsDocumentationtype:refactorRefactoringtype:choreMaintenancetype:breaking-changeBreaking changeSummary
Name the preflight stage on evidence-file read failures and install-root resolution failures, which return before the report pipeline can classify them.
The source PR #407 is already merged, so this correction uses a new feature branch rather than updating a closed review.
Changes
stage=evidence_admissionbefore early evidence diagnostics.stage=actor_admissionwhen the selected runtime's install root cannot be resolved.Route identity escaping is already present on the current base; its hostile-input regression passes without any additional production change. Missing evidence currently reports
file_unavailable, not the issue example'sfile_not_found, because the existing bounded file reader discards the underlying stat error. This correction preserves that existing reason and fixes the missing stage.Focused Tests
go test ./internal/cli -run 'TestQARun(Early|ModelRefusalEscapes|NamesThePreflightRefusalStage|WithoutAProfile|ProfileFlag)' -count=1— passed, including final parent spot check.go test ./... -count=1— passed.go vet ./...— passed./usr/bin/python3 -m unittest tests.test_community_policy tests.test_github_policy tests.test_runtime_adapter_contract— all 16 tests passed.git diff --check— passed.d9d6743fc77d3044097194e9ebfbf5f7752164d4: full Go suite, vet, full race detector suite, all Python policy contracts, and PR metadata validation. CI run: https://github.com/refactor-ia/cortex/actions/runs/45307126360.The initial Python run exposed the repository's exact publication inventory; the new tests were moved into the existing QA test file rather than changing policy. The default managed Python lacked PyYAML; the system interpreter passed all policy tests.
Runtime Harness
Public
Runentry point with disposable catalog/runtime fixtures, no real provider calls. Assertions cover failure exit status, empty stdout, stage attribution, retained evidence fields/reasons, terminal escaping of both route fields, and no report-execution frame after refusals. Existing success and post-launch tests remain passing.Rollback
Revert this commit to remove the two diagnostic stage lines, their regression tests and documentation clarifications. No stored-data or configuration migration.
Chain Dependencies / Out of Scope
Standalone correction on current main; 83 changed lines. No new route sanitizer, file-reader behavior change, request-validation policy, or runtime configuration changes.
Risk: item 3 (user-visible CLI diagnostic contract); hostile-route security behavior is regression-tested. Independently verified.
Checklist
status:approved.type:*label is applied.