Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reinforcement Learning from Compiler and Language Server Feedback

(authored by agents unless marked 🧑) Tag: zhang2025reinforcement, paper

rlcsf + lanser-cli: compiler/language-server feedback as replayable transitions for coding agents

  • state = task + workspace snapshot + selectors, action = query or mutation, observation = analysis bundle
  • instantiated with LSP + Pyright for Python
  • no downstream agent benchmark reported selector dsl with deterministic relocation
  • addresses stale file:line:col after edits and overload ambiguity
  • selector kinds: cursor/range, qualified symbol, ast path, content anchor
  • relocate by doc-version map, reparse, or winnowed k-gram search
  • auto-accept only if top score >= tau and margin >= delta
    • else return top-k alternatives; mutations need explicit target confirmation canonical analysis bundles
  • normalize locations, pin tool/server versions and encoding, hash stable fields (sha256 of JCS)
  • same snapshot + tool + request gives byte-identical bundle, under deterministic tool semantics
  • enables audit, offline supervision, reward replay without rerunning server preview-first guarded mutation
  • edits default to dry-run diff; need explicit --apply
  • clean git worktree, workspace jail, conflict detection, rollback metadata
  • per-file atomic replace is not crash-atomic across files potential-based process reward
  • phi(B) = -wDdiagnostics + wSsafety + wA*selector confidence
  • r_t = gammaphi(B_t) - phi(B_t-1) - wEtool error
  • diagnostic change credited only over equal scope
  • non-negative when gamma=1, same scope, all components weakly improve, no error
  • wE > 0 may change the optimal policy
  • shaping signal only, not a replacement for task success verus inference
  • same loop fits verus diagnostics as step reward for proof agents
  • reward usefulness depends on weights and features, unproven

Last edited: