mirror of
https://github.com/codician-team/growmos.git
synced 2026-08-18 06:47:17 +02:00
Normalize source refs to POSIX paths (fixes Windows CI)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_15e0af4a3dd5", "kind": "file", "ref": "docs/evaluation.md", "schema_version": 1, "sha256": "1eb6e959059e66ecdbcc35b93ab524635607f157254f763ef030a58b797cd227", "stats": {"entities": 5, "relations": 5}, "status": "pending", "title": "evaluation.md", "updated": "2026-08-17T11:58:47Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_15e0af4a3dd5", "kind": "file", "ref": "docs/evaluation.md", "schema_version": 1, "sha256": "1eb6e959059e66ecdbcc35b93ab524635607f157254f763ef030a58b797cd227", "stats": {"entities": 5, "relations": 5}, "status": "pending", "title": "evaluation.md", "updated": "2026-08-17T11:59:04Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_3fd317a2cb2b", "kind": "file", "ref": "docs/file-format.md", "schema_version": 1, "sha256": "9f93981a6778d7a991c735ff0b2e8b1d3a51bd1d11cd1bd908dc3b401ce33c04", "stats": {"entities": 7, "relations": 6}, "status": "extracted", "title": "file-format.md", "updated": "2026-08-17T11:49:36Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_5dd15b5b20d6", "kind": "file", "ref": "METHODOLOGY.md", "schema_version": 1, "sha256": "7ad5c4305900d6f954fb124e41692573267f3ccb49e363786c4c136fb7e3ba1e", "stats": {"entities": 13, "relations": 13}, "status": "extracted", "title": "METHODOLOGY.md", "updated": "2026-08-17T11:49:36Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_644a9dc71c36", "kind": "file", "ref": "docs/headless.md", "schema_version": 1, "sha256": "5db7953e9111f7722f740e80220d3ad099e667e5d848e6e47c02047f722eb983", "stats": {"entities": 5, "relations": 4}, "status": "extracted", "title": "headless.md", "updated": "2026-08-17T11:49:36Z"}
|
||||
{"added": "2026-08-17T11:51:11Z", "id": "src_7a4afa70f300", "kind": "note", "ref": "session:2026-08-17 build", "sha256": "7a4afa70f3001f4f653daa0f7af9b9219e8ea734ce4e7604c707c1437906efe2", "status": "note", "title": "session:2026-08-17 build", "updated": "2026-08-17T11:51:11Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_a384388adcb2", "kind": "file", "ref": "docs/agents.md", "schema_version": 1, "sha256": "1db8b7ef7f859f0d26caa4f2b53b52d581510ea8a02ed5b2fb8beed9fe972ad1", "stats": {"entities": 9, "relations": 8}, "status": "extracted", "title": "agents.md", "updated": "2026-08-17T11:49:36Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_b33563055168", "kind": "file", "ref": "README.md", "schema_version": 1, "sha256": "eb3d831021dd979a6f2a888a37d10caefdacf30dd3d3961b73e83c1c6b8a01c7", "stats": {"entities": 14, "relations": 13}, "status": "pending", "title": "README.md", "updated": "2026-08-17T11:58:47Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_eca12c0a30e2", "kind": "file", "ref": "CONTRIBUTING.md", "schema_version": 1, "sha256": "ae1583a24ce33b8de5367fed5186e634552c5109ef944d78fafe0fca4fd5b3a6", "stats": {"entities": 4, "relations": 3}, "status": "pending", "title": "CONTRIBUTING.md", "updated": "2026-08-17T11:58:47Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_b33563055168", "kind": "file", "ref": "README.md", "schema_version": 1, "sha256": "eb3d831021dd979a6f2a888a37d10caefdacf30dd3d3961b73e83c1c6b8a01c7", "stats": {"entities": 14, "relations": 13}, "status": "pending", "title": "README.md", "updated": "2026-08-17T11:59:04Z"}
|
||||
{"added": "2026-08-17T11:49:36Z", "extracted_at": "2026-08-17T11:50:35Z", "id": "src_eca12c0a30e2", "kind": "file", "ref": "CONTRIBUTING.md", "schema_version": 1, "sha256": "ae1583a24ce33b8de5367fed5186e634552c5109ef944d78fafe0fca4fd5b3a6", "stats": {"entities": 4, "relations": 3}, "status": "pending", "title": "CONTRIBUTING.md", "updated": "2026-08-17T11:59:04Z"}
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@ def cmd_add(args: argparse.Namespace) -> int:
|
||||
p = Path(ref)
|
||||
if not p.exists():
|
||||
raise StoreError(f"not found: {ref}")
|
||||
rel = str(p.resolve().relative_to(st.root)) if p.resolve().is_relative_to(st.root) else None
|
||||
rel = p.resolve().relative_to(st.root).as_posix() if p.resolve().is_relative_to(st.root) else None
|
||||
if rel is None:
|
||||
text = p.read_text(encoding="utf-8", errors="replace")
|
||||
rec, changed = st.register_source(str(p.resolve()), text=text, kind="text", title=p.name)
|
||||
|
||||
@@ -221,7 +221,7 @@ class Store:
|
||||
found.add(p)
|
||||
out = []
|
||||
for p in sorted(found):
|
||||
rel = str(p.relative_to(self.root))
|
||||
rel = p.relative_to(self.root).as_posix()
|
||||
if any(fnmatch.fnmatch(rel, e) or fnmatch.fnmatch("./" + rel, e) for e in exc):
|
||||
continue
|
||||
if rel.startswith(DIRNAME + "/"):
|
||||
@@ -237,6 +237,8 @@ class Store:
|
||||
A changed content hash flips status back to 'pending' — this is the incremental
|
||||
update rule: extract only what changed (§IX.C).
|
||||
"""
|
||||
if kind == "file":
|
||||
ref = ref.replace("\\", "/")
|
||||
sid = self._source_id(ref)
|
||||
if text is None and kind == "file":
|
||||
path = self.root / ref
|
||||
@@ -283,7 +285,7 @@ class Store:
|
||||
report: Dict[str, List[str]] = {"new": [], "changed": [], "missing": []}
|
||||
seen: Set[str] = set()
|
||||
for path in self.iter_candidate_files():
|
||||
rel = str(path.relative_to(self.root))
|
||||
rel = path.relative_to(self.root).as_posix()
|
||||
sid = self._source_id(rel)
|
||||
existed = sid in self.sources
|
||||
seen.add(sid)
|
||||
|
||||
Reference in New Issue
Block a user