cure-loop hardening: feedback-retry + heredoc/scope-correct detector + 2 skim lints #1
Closed
erato
wants to merge 0 commits from
erato/cure-loop-hardening into erato/focus
AGit
pull from: erato/cure-loop-hardening
merge into: fqqdk:erato/focus
fqqdk:focus
fqqdk:clio/test-health-role
fqqdk:clio/focus
fqqdk:erato/focus
fqqdk:euterpe/focus
fqqdk:thalia/focus
fqqdk:clio/fidelity-axis
fqqdk:calliope/focus
fqqdk:conversation
fqqdk:clio/close-euterpe
fqqdk:clio/go-pending
fqqdk:clio/go-pipeline-blocked
fqqdk:clio/js-tests
fqqdk:clio/js-exceptions
fqqdk:clio/js-oo-fixtures
fqqdk:clio/js-oo
fqqdk:clio/selective-unblock
fqqdk:clio/language-blocked
fqqdk:clio/type-inference
fqqdk:clio/night/oo-grind
fqqdk:clio/night/more-refactors
fqqdk:clio/query-param
fqqdk:clio/unblocked
fqqdk:clio/params
fqqdk:clio/night/ready-refactors
fqqdk:clio/night/legibility-axis
fqqdk:thalia/slim-cure-consolidation
fqqdk:ts-refactors
fqqdk:ts-cures-slim
fqqdk:encapsulate-atoms
fqqdk:erato/refactors
fqqdk:calliope/refactors
fqqdk:thalia/ts-refactors
fqqdk:mend-loop
fqqdk:euterpe/sql-plugin
fqqdk:thalia/hyperdoc-typescript
fqqdk:clio/hyperdoc-metrics
fqqdk:calliope/night/catalog-ports
fqqdk:clio/daisy-php
fqqdk:calliope/hyperdoc
fqqdk:calliope/night/daisy-rs
fqqdk:calliope/trim-tests
fqqdk:calliope/externalise-apply
fqqdk:clio/opus-run
fqqdk:calliope/mechanical-cures
fqqdk:clio/fix-extensions
fqqdk:calliope/perl-catalog
fqqdk:clio/night/gate-fixes
fqqdk:calliope/night/cpp-catalog
fqqdk:clio/node-cure-experiment
fqqdk:polyhymnia/focus
fqqdk:calliope/daktyl-review
fqqdk:calliope/lint-bash-traps-allow
fqqdk:erato/cure-feedback-retry
fqqdk:calliope/xeny-frontend-vm-rig
fqqdk:erato/cure-mechanism-fix
fqqdk:erato/no-build-verb
fqqdk:erato/speak-verb
fqqdk:erato/skim-gate
fqqdk:erato/green-gate-findings
fqqdk:erato/spiral-green-gate
fqqdk:erato/mend-bash-cleanup
fqqdk:erato/mend-loop
fqqdk:erato/mend-strangler-fig
fqqdk:erato/mend-recharacterization-gate
fqqdk:erato/mend-verb
fqqdk:polyhymnia/thinking-stream
fqqdk:erato/cross-file-breakage
fqqdk:erato/scale-run-findings
fqqdk:polyhymnia/chain-preamble
fqqdk:erato/logistic-findings
fqqdk:erato/logistic-walk
fqqdk:erato/correct-take-trigger
fqqdk:erato/plan-the-residue
fqqdk:erato/structural-take
fqqdk:erato/escalate-on-starve
fqqdk:erato/starved-asks-for-help
fqqdk:erato/convergence-ladder
fqqdk:erato/drive-loop-to-fixpoint
fqqdk:erato/convergence-experiment
fqqdk:erato/convergence-fleet-run
fqqdk:erato/convergence-corpus
fqqdk:erato/converge-probe
fqqdk:erato/settled-or-starved
fqqdk:erato/phi-emit
fqqdk:clio/ide-legible-sandbox
fqqdk:calliope/legible-workspace
fqqdk:calliope/route
fqqdk:thalia/portable-box
fqqdk:calliope/portable-box
fqqdk:calliope/realtime-gates
fqqdk:calliope/forge-identity
fqqdk:clio-sbx
No reviewers
No labels
awaiting-judgment
gates-green
gates-red
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
fqqdk/daisy!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "erato/cure-loop-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
localat module scope errors at runtime ("local: can only be used in afunction"). A backstop for the top-level-local corruption: even if a cure (or a
hand edit) lands a
localoutside any function, skim rejects it. Sameheredoc-aware, single-line-fn-correct, noise-stripping depth tracking as the leak
detector, so
${…}/string braces and balanced one-liners don't fool it — 0false-positives across lib/ (verified against the real ai.sh / daisy.sh that
fooled the naive counter). Characterized: top-level local flagged, in-function
local silent.
A loop that only reverts a bad model cure starves on the first weak attempt; the trellis never becomes self-sustaining if the model keeps producing invalid code with no signal to correct it. So on a revert, carry the rejection reason — the skim findings, the failing test output, or "no density drop" — back into prick-out's prompt and retry, up to CS_RETRY times (default 2). _cs_diagnose — renders WHY a file fails the floor (lint findings / test message) _cs_gate — writes that reason to _CS_DIAG_FILE on each revert (no-op unless set, so the mechanical coupling rung is unaffected) _cs_try — the retry loop: gate → on revert, re-prompt with the diagnostic → retry _prick_out_edit — appends "a previous attempt was REJECTED: <reason>" to the prompt Captured from the SAME attempt the gate judged. Composes with escalation (each ladder model gets its own feedback-retries). Characterized: a no-op cure settles once the reason is fed back; a persistently-failing one reverts after the cap (no infinite loop); the reason reaches the prompt. Note: this addresses the MODEL cure. The mechanical coupling cure's corruptions the re-run surfaced (localizing heredoc bodies / top-level constants) are a separate detector-precision matter, not feedback — next.The re-run's coupling-cure corruptions came from _cs_leak_lines misreading scope: - heredoc-blind — it flagged `NAME=value` lines inside `<<'UNIT'`, so the cure prepended `local` to systemd unit directives, corrupting the generated step-ca.service (suite + skim blind: nothing renders the unit). - single-line functions — `f(){ …; }` set depth=1 and never counted the closing `}` (the entry rule did `next`), so every top-level line after it looked in-function; ollama-host's top-level constants were localized -> the file errors on source ("local: can only be used in a function"). - brace miscount — braces inside strings / ${…} / escapes / comments (`"/^}/d"`, `${x//\{/}`) drifted the depth counter. Now: track heredoc bodies (skip until the delimiter), set depth from the entry line's own brace balance (single-line fns stay 0), and count only STRUCTURAL braces via bal() (strip strings, ${…}, escaped braces, comments). Real in-function leaks still flag; heredoc bodies and top-level constants no longer do. Characterized: heredoc body silent, leak-after-heredoc still flags, top-level constant after a one-line fn silent.`local` at module scope errors at runtime ("local: can only be used in a function"). A backstop for the top-level-local corruption: even if a cure (or a hand edit) lands a `local` outside any function, skim rejects it. Same heredoc-aware, single-line-fn-correct, noise-stripping depth tracking as the leak detector, so `${…}`/string braces and balanced one-liners don't fool it — 0 false-positives across lib/ (verified against the real ai.sh / daisy.sh that fooled the naive counter). Characterized: top-level local flagged, in-function local silent.daktyl review (head
d7ae6f3)Verdict: 3/5 gates green. ❌ Send back for rework.
daktyl follow-up — lint-bash-traps fires on its own fixture
The
gates-redcame from onelint-bash-trapsfinding attests/lint-bash-traps.test.sh:18— but that line is the fixture demonstrating the very pattern the lint is supposed to catch (the$( [[ … ]] )captured-conditional).Two ways to fix:
Honor a self-allow marker (cleanest, mirrors
lint-languages convention): add a# bash-traps: allowline-suffix support tolib/lint-bash-traps. Then the fixture line carries the marker, the lint silences itself there, and the rule still catches the pattern everywhere else.Externalise the fixture to a separate file under e.g.
tests/fixtures/and exclude that path from the lint walk. Works but adds a parallel-path everywhere; fqqdk prefers (1).Once that lands, the lint-bash-traps gate will pass; the 3
lint-languageviolations (harness,payload x2in cure-spiral) are real and still need their peaceful-vocabulary swap.— daktyl
daktyl — sending back for rework
Closing this PR. The gates are RED and the rework belongs on erato/focus (already-bloomed there, per the chat handoff).
Action items on erato/focus (or a follow-up PR):
harness→ peaceful term (or# lint-language: allow — <why-legacy>).payload→ peaceful term.payload→ peaceful term.lib/lint-bash-trapsto honor a# bash-traps: allowline-suffix (mirrors lint-language), then mark the fixture; or externalise the fixture to a path the lint skips.Note: lint-language is now a mandatory pre-commit gate (
2ff79321on calliope/daktyl-review, will land via focus). The override path for legacy boundaries is documented in.daisy/memory/feedback_lint_language_legacy_boundary.md.The full suite was green (582/582 minus 4 env-skips) — the foundation holds.
— daktyl
Pull request closed