guardian-framework 0.1.164 → 0.1.165

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.164", 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;
3209
+ var name = "guardian-framework", version = "0.1.165", 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.164", 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;
1994
+ var name = "guardian-framework", version = "0.1.165", 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,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.164",
3
+ "version": "0.1.165",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -204,6 +204,16 @@ export function generateEpicTestFiles(options: TddGenerateOptions): string[] {
204
204
 
205
205
  mkdirSync(testDir, { recursive: true });
206
206
 
207
+ // Python: a unique __init__.py per test package. Without it pytest's
208
+ // default "prepend" import mode imports test modules by BASENAME, so
209
+ // <module>/domain-services/test_domain-services.py collides with
210
+ // <other-module>/domain-services/test_domain-services.py and the whole
211
+ // suite fails to collect once two modules share a component name.
212
+ if (language === "python") {
213
+ const initPath = join(testDir, "__init__.py");
214
+ if (!existsSync(initPath)) writeFileSync(initPath, "", "utf-8");
215
+ }
216
+
207
217
  const fileName = getTestFileName(componentId, language);
208
218
  const filePath = join(testDir, fileName);
209
219
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-11-13T21:11:04Z",
2
+ "timestamp": "2026-11-13T21:39:58Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {
@@ -234,6 +234,23 @@ def classify(code):
234
234
 
235
235
  AC_ID = re.compile(r"\b[A-Z]{1,3}-\d{1,3}\b")
236
236
 
237
+ def find_all_test_basenames():
238
+ """basename -> [paths] for every test file in the project."""
239
+ out = {}
240
+ for base_dir in ("tests",):
241
+ base_path = os.path.join(root, base_dir)
242
+ if not os.path.isdir(base_path):
243
+ continue
244
+ for dp, _dn, fs in os.walk(base_path):
245
+ if "__pycache__" in dp:
246
+ continue
247
+ for f in fs:
248
+ stem = f.rsplit(".", 1)[0]
249
+ if stem.startswith("test_") or stem.endswith("_test"):
250
+ out.setdefault(f, []).append(os.path.join(dp, f))
251
+ return out
252
+
253
+
237
254
  def find_tests(slug):
238
255
  """Test files for the module. `tests/` wins; `src/` is a fallback only for
239
256
  projects that colocate tests, so source files are never counted as suites."""
@@ -418,6 +435,25 @@ def verify(slug):
418
435
  except Exception as e:
419
436
  checks.append(("type check", True, f"skipped ({e})"))
420
437
 
438
+ # 3c. test isolation: duplicate test basenames across packages break pytest
439
+ # collection entirely (prepend import mode imports by basename), which
440
+ # silently hides every suite behind "2 errors during collection".
441
+ if tests:
442
+ by_base = {}
443
+ for t in tests:
444
+ by_base.setdefault(os.path.basename(t), []).append(t)
445
+ for base, paths in find_all_test_basenames().items():
446
+ if len(paths) < 2:
447
+ continue
448
+ dirs = {os.path.dirname(p) for p in paths}
449
+ isolated = all(os.path.exists(os.path.join(d, "__init__.py")) for d in dirs)
450
+ if not isolated:
451
+ checks.append(("test isolation", False,
452
+ f"'{base}' exists in {len(dirs)} packages without __init__.py — "
453
+ f"pytest collection collides; add __init__.py or set import-mode=importlib"))
454
+ ok_all = False
455
+ break
456
+
421
457
  # 4b. recorded evidence must still hold (spec: a contract change means
422
458
  # the module is no longer frozen and must be re-frozen).
423
459
  st_rec = load_state()