You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The brief told bees to reuse across modules, and that generates code which does not compile #4296
#4293 added a line to every issue the feeder writes: "If it exists, reuse it (use module::name;) rather than writing it again."
Cross-module reuse does not generate. Proven on a two-spec minimal case:
$ cat specs/shared_math.t27
module SharedMath { pub fn double_it(x: i32) -> i32 { var out : i32 = x * 2; return out; } ... }
$ cat specs/uses_shared.t27
module UsesShared { use shared_math::double_it;
pub fn quadruple(x: i32) -> i32 { var once : i32 = double_it(x); ... } }
$ t27c spec-status specs/uses_shared.t27
IMPLEMENTED
$ t27c gen specs/uses_shared.t27 | grep -n '@import\|use double_it'
5:const std = @import("std");
18:// use double_it: no references in this module
$ zig test uses_shared.zig --test-no-exec
error: use of undeclared identifier 'double_it'
The same happens with the module-qualified form (use shared_math; + shared_math::double_it(x)): the qualifier is dropped and no import is emitted.
So the instruction asks a bee to write code that spec-status calls IMPLEMENTED and the oracle then refuses. That is the worst shape of advice: it passes the cheap gate and fails the real one.
Done when
python3 -c "import importlib.util;spec=importlib.util.spec_from_file_location('f','tools/queen/feed_empty_bodies.py');m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m);print(m.PREAMBLE)" | grep -c 'do not try to import it' prints at least 1
the text states what a bee should do instead: name the file and line where the function already lives, and implement only what its own criteria ask
Activity
fix(queen): the brief told bees to reuse across modules, which does n…
Hand the swarm the compiler's instruments, not four of them (#4302)
feat(queen): re-file the issues no bee can take again (#4441)