guardian-framework 0.1.161 → 0.1.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -3206,7 +3206,7 @@ __export(exports_package, {
|
|
|
3206
3206
|
bin: () => bin,
|
|
3207
3207
|
author: () => author
|
|
3208
3208
|
});
|
|
3209
|
-
var name = "guardian-framework", version = "0.1.
|
|
3209
|
+
var name = "guardian-framework", version = "0.1.162", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
|
|
3210
3210
|
var init_package = __esm(() => {
|
|
3211
3211
|
exports = {
|
|
3212
3212
|
".": {
|
package/dist/exports.js
CHANGED
|
@@ -1991,7 +1991,7 @@ __export(exports_package, {
|
|
|
1991
1991
|
bin: () => bin,
|
|
1992
1992
|
author: () => author
|
|
1993
1993
|
});
|
|
1994
|
-
var name = "guardian-framework", version = "0.1.
|
|
1994
|
+
var name = "guardian-framework", version = "0.1.162", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
|
|
1995
1995
|
var init_package = __esm(() => {
|
|
1996
1996
|
exports = {
|
|
1997
1997
|
".": {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-13T20:
|
|
2
|
+
"timestamp": "2026-11-13T20:21:08Z",
|
|
3
3
|
"mode": "all",
|
|
4
4
|
"stages_run": [],
|
|
5
5
|
"summary": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"failed": 1,
|
|
9
9
|
"skipped": 12
|
|
10
10
|
},
|
|
11
|
-
"duration_seconds":
|
|
11
|
+
"duration_seconds": 0,
|
|
12
12
|
"results": [
|
|
13
13
|
{
|
|
14
14
|
"name": "check_mr_traceability.sh",
|
|
@@ -206,6 +206,20 @@ SHAPE_ASSERT = re.compile(
|
|
|
206
206
|
r"\bnames\b|annotations\[|startswith\(\s*[\"']set_|__dict__|dir\()"
|
|
207
207
|
)
|
|
208
208
|
|
|
209
|
+
# Guardian's own generated scaffolding: `assert False, "TODO: ..."`. Red by
|
|
210
|
+
# construction, proves nothing — accepting it is how a "freeze" ends up with no
|
|
211
|
+
# net at all.
|
|
212
|
+
PLACEHOLDER = re.compile(
|
|
213
|
+
r"(assert\s+False\b|fail\(\s*[\"']TODO|t\.Fatal\(\s*[\"']Test not yet implemented|"
|
|
214
|
+
r"throw new Error\(\s*[\"']TODO|panic!\(\s*[\"']Test not yet implemented|"
|
|
215
|
+
r"TODO: uncomment when|TODO: implement dependency test)",
|
|
216
|
+
re.I,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
def is_placeholder(src):
|
|
220
|
+
return bool(PLACEHOLDER.search(src))
|
|
221
|
+
|
|
222
|
+
|
|
209
223
|
def classify(code):
|
|
210
224
|
"""Return 'behaviour' | 'structural' | 'none'."""
|
|
211
225
|
asserts = [l for l in code.splitlines() if re.match(r"\s*assert\b", l)]
|
|
@@ -239,13 +253,18 @@ def find_tests(slug):
|
|
|
239
253
|
|
|
240
254
|
def analyse_tests(slug, tests):
|
|
241
255
|
"""Return (total, behaviour, structural_only, ac_named, details)."""
|
|
242
|
-
total = behaviour = struct_only = ac_named = 0
|
|
256
|
+
total = behaviour = struct_only = ac_named = placeholders = 0
|
|
243
257
|
details = []
|
|
244
258
|
for f in tests:
|
|
245
259
|
src = read(f)
|
|
246
260
|
if not src.strip():
|
|
247
261
|
continue
|
|
248
262
|
code = "\n".join(l for l in src.splitlines() if not l.strip().startswith("#"))
|
|
263
|
+
if is_placeholder(code):
|
|
264
|
+
placeholders += 1
|
|
265
|
+
details.append(f"{os.path.relpath(f, root)}: placeholder scaffolding (assert False/TODO)")
|
|
266
|
+
total += 1
|
|
267
|
+
continue
|
|
249
268
|
kind = classify(code)
|
|
250
269
|
body_struct = kind == "structural"
|
|
251
270
|
body_behav = kind == "behaviour"
|
|
@@ -260,7 +279,7 @@ def analyse_tests(slug, tests):
|
|
|
260
279
|
details.append(f"{os.path.relpath(f, root)}: structural assertions only")
|
|
261
280
|
if acs:
|
|
262
281
|
ac_named += 1
|
|
263
|
-
return total, behaviour, struct_only, ac_named, details
|
|
282
|
+
return total, behaviour, struct_only, ac_named, details, placeholders
|
|
264
283
|
|
|
265
284
|
def run_python_tests(tests):
|
|
266
285
|
"""Return (status, reason, sample) where status: red_ok|red_wrong|green|unknown."""
|
|
@@ -325,11 +344,17 @@ def verify(slug):
|
|
|
325
344
|
|
|
326
345
|
# 3. tests exist, are behaviour (not structural-only), and name ACs
|
|
327
346
|
tests = find_tests(slug)
|
|
328
|
-
total, behaviour, struct_only, ac_named, tdetails = analyse_tests(slug, tests)
|
|
347
|
+
total, behaviour, struct_only, ac_named, tdetails, placeholders = analyse_tests(slug, tests)
|
|
329
348
|
ok_tests = bool(tests)
|
|
330
349
|
checks.append(("contract tests", ok_tests, f"{len(tests)} file(s)" if tests else "no tests referencing the module"))
|
|
331
350
|
ok_all &= ok_tests
|
|
332
351
|
|
|
352
|
+
ok_placeholder = placeholders == 0
|
|
353
|
+
checks.append(("no placeholders", ok_placeholder,
|
|
354
|
+
"no generated scaffolding" if ok_placeholder
|
|
355
|
+
else f"{placeholders} suite(s) are guardian scaffolding (assert False / TODO), not tests"))
|
|
356
|
+
ok_all &= ok_placeholder
|
|
357
|
+
|
|
333
358
|
# Advisory only: a syntactic shape-vs-behaviour classifier is always
|
|
334
359
|
# arguable. The objective gate is the RED check below — tests that are GREEN
|
|
335
360
|
# over NotImplementedError bodies are structural by definition, whatever the
|
|
@@ -347,6 +372,10 @@ def verify(slug):
|
|
|
347
372
|
# 4. RED for the right reason
|
|
348
373
|
status, reason, sample = run_python_tests(tests) if tests else ("unknown", "no tests", "")
|
|
349
374
|
ok_red = status == "red_ok"
|
|
375
|
+
if placeholders > 0 and status == "red_ok":
|
|
376
|
+
ok_red = False
|
|
377
|
+
reason = (f"{placeholders} placeholder suite(s) fail by construction — "
|
|
378
|
+
f"red is not evidence until they assert a rule")
|
|
350
379
|
if status == "green":
|
|
351
380
|
reason = ("tests are GREEN while the module is unimplemented — they assert shape, "
|
|
352
381
|
"not rules; a freeze needs failing behaviour tests")
|