frontend: provide contextual source repair advice
This commit is contained in:
1 parent
008867fe48
commit
2c6c7a3dcd
37 files changed
+562
-24
No files matched your search
@@ -6,7 +6,7 @@ Non-normative work item following the owner's 2026-10-09 proposal. This does not
|
||||
|
||||
The owner reports 15 GLM-5.3-flash sessions on four public dev tasks: of 52 rejected checks, the first diagnostic was E7001 in 30, E7005 in 10 and E7006 in six. Missing var annotations, lossy casts and Rust-style negation were frequent. These aggregates are supplied observations, not independently audited runs. First-code counts are not counts of all errors; one model family does not establish a language-inference policy. No task implementation, private corpus or frozen experiment is inspected or changed for this investigation. The proposed threefold reduction in E7001 checks is an experiment target, not a demonstrated effect.
|
||||
|
||||
Twelve minimal current-language probes confirm: prefix `!`, missing var type, `mut slice<T>`/`ref slice<T>`, an omitted range end, `[zero; N]` and `&` in arguments/bindings reject E7001; a lossy widening cast rejects E7005. Three syntactically invalid functions yield one E7001; two independently invalid casts yield one E7005. Crucially, `let x = 1u64` already accepts: let inference is specified, and its annotation must not be demanded by a repair hint. These are generic syntax probes, not dev-task reproductions.
|
||||
Twelve minimal current-language probes confirm: prefix `!`, missing var type, `mut slice<T>`/`ref slice<T>`, an omitted range end, `[zero; N]` and `&` in arguments/bindings reject E7001; a non-widening integer cast rejects E7005. Three syntactically invalid functions yield one E7001; two independently invalid casts yield one E7005. Crucially, `let x = 1u64` already accepts: let inference is specified, and its annotation must not be demanded by a repair hint. These are generic syntax probes, not dev-task reproductions.
|
||||
|
||||
## First increment: explicit advice without syntax aliases
|
||||
|
||||
@@ -40,3 +40,11 @@ Preserve one diagnostic per code/source location and the E7900 rule replacing al
|
||||
4. Have the evaluation owner rerun public dev tasks after the changes; retain both first-code and full diagnostic counts, model/tool settings and frozen input identities. Do not modify a frozen matrix in place.
|
||||
|
||||
Var inference remains an optional language-policy question. No change is adopted from these aggregates; the first increment can reduce repair burden while retaining explicit var annotations. Contract research and its full P6-6 exit criterion remain open.
|
||||
|
||||
## First increment delivered (2026-10-09)
|
||||
|
||||
Nine registered kinds now provide contextual E7001/E7005 advice through `repair_candidates`; argument and binding borrows are separate. Fixed hints and alternative units are specified in spec 10/15 and the registry. Enum variant payloads, `&&`, unsupported block comments, incomplete types and other nearby spellings have explicit exclusion tests. No syntax alias, var inference, inferred slice end or automatic cast selection was added.
|
||||
|
||||
Validation: 1735/1735 conformance, including exact `.advice` JSON goldens for all kinds; 161 CLI/package advice checks; unit/registry tests, grammar, formatter, hosted smoke and format checks. Independent Claude review caught the enum-payload context and confirmed the static candidate lifetime correction. Multi-error collection and the public dev measurement remain pending.
|
||||
|
||||
Bundle growth versus the pre-increment generated bundle (whose Quick Reference matched HEAD): Quick Reference `cl100k_base` 8955 → 9237 (+282, 3.15%), `o200k_base` 8991 → 9272, Qwen2.5 9233 → 9515. Full Source Reference Bundle excluding AIR: 77358 → 78582 (+1224, 1.58%), 77594 → 78815 and 79315 → 80563 respectively. The table and machine advice registry account for this explicit cost; the proposed reduction in repair rounds has not been measured.
|
||||
Reference in new issue
Block a user