knowledge: python data-file packaging (new backend/python/packaging), orchestrator-injected env in test suites, reflow vs substring anchors (3 verified, mechanism corrected, 1 half folded into #47) - #103
Open
choiyounggi wants to merge 1 commit into
Conversation
- NEW backend/python/packaging/data-files-and-install-paths (NEW category packaging): __file__-relative data files break after pip install .; declare package data, resolve via importlib.resources, verify against a wheel in a scratch venv (setuptools + CPython docs; linkly rc=4 repro) - testing/data/test-data-and-isolation: +orchestrator-injected env rows — unset LO_*-style coordination vars in setup, pass tempdir state paths explicitly; leaked values corrupt the live run's shared state (issue #100) - qa/document-verification/editing-a-gated-document: +reflow breakage mode on the Substring anchor row, +platform-invisible-failure edge (bash <=4.0 mid-test [[ ]] gap), measured 2026-08-14; harvested mechanism claim falsified and corrected (runtime half deferred to open PR #47)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 3 insight(s)
Verified best-practice
1.
__file__-relative data files break after non-editable install → package data +importlib.resources(hasha9e3db01b9b1ceb1, linkly session)__file__-relative paths works in editable/PYTHONPATHruns but fails afterpip install .; data files must be declared as package data and resolved viaimportlib.resources.importlib.resourcesto access them";__file__manipulation "isn't compatible with PEP 302-based import hooks, including importing from zip files";include_package_data/package_datacontrol wheel contents. https://docs.python.org/3/library/importlib.resources.html — resources "do not have to exist as physical files and directories";as_file()yields a real path and cleans up extractions.lnpl buildrc=4, grammar path resolved to.venv/lib/python3.13/mlir/lnpl.irdl.mlir(absent from the wheel) whilePYTHONPATH=implbuilt fine.2. Orchestrator-injected coordination env leaks into harness test suites (hash
03b0983bb4a5d9d8, dev-loop session)LO_*/GROUNDWORK_*vars leak into the scripts under test — tests fail against the unset-env baseline AND test writes land in the live run's shared state (watcher then monitors the wrong session). Unset injected vars in setup; pass tempdir state paths explicitly.launch-session.batsfailures reproduced withenv LO_RUN_ID=… batson a clean checkout; livet90.jsonfound rewritten with bats tempdir paths and a foreign session name. The env-merge mechanism (envmerges into the inherited environment unless-i) is already sourced on the target page (pubs.opengroup.org env spec).3. Reflowing prose that tests assert as a single-line substring (hash
4b8d97490dc0ed5e, dev-loop session)[[ ]], so only ubuntu CI fails."[[ "$s" == *"return to step 1"* ]]does NOT match a newline-split phrase (NOMATCH on both old and new bash). What actually differs by platform:set -e; [[ 1 -eq 2 ]]; echo REACHEDprints REACHED on bash 3.2 — under bash ≤4.0 a failing mid-test[[ ]]doesn't abort, so the broken assertion passes silently on macOS while bash ≥4.2 CI fails it.tests/orchestrate-review-pass.bats:81uses exactly this mid-test[[ ]]form.Existing-layer check
Pages read: qa-document-verification-editing-a-gated-document, testing-data-test-data-and-isolation, infrastructure-agent-orchestration-shared-run-state, infrastructure-agent-orchestration-worktree-isolated-workers
wiki/for__file__/importlib: zero hits → insight 1 is not covered anywhere; created new page (a stale local-only branchknowledge/dch0202-20260805-144711once drafted a related page but has no PR and is not in main — not an open-PR obligation).testing-data-test-data-and-isolationalready carries the generic absent-variableunsetrow and the env-derived-write-path row; insight 2's injected-orchestration-env → live-state corruption angle was missing → merged (+1 Do row, +1 edge case, +1 field-incident source), related-links added both ways withinfrastructure-agent-orchestration-shared-run-state. No conflict with existing directives.qa-document-verification-editing-a-gated-documentcovers anchor inventory before editing; its Substring anchor row lacked the reflow/line-wrap breakage mode and the platform-invisible-failure twist → merged (extended Substring row, +1 edge case, +1 Instead-of row, +2 sources), cross-linking existingtesting-quality-tests-that-cannot-fail. No conflict.node scripts/wiki-lint-prohibitions.js: 61 directives, 0 violations after edits.Open-PR check
Listed 27 open
knowledge/*heads (gh pr list, head:knowledge/) and greppedgit diff origin/main...<head> -- wiki/across all fetched knowledge branches forimportlib|__file__|package data|LO_|GROUNDWORK_|ambient env|unset|bats|bash 3.2|normalize_ws|line-wrap|whitespace.__file__→ new.dch0202-20260805-103148/ closed PR knowledge: 5 insights — test suites that cannot see, and a throttle the auth path walks past #28 is already in main) → new.knowledge/dch0202-20260806-130040) — knowledge: bats/bash-3.2 assertion trap + 4 orchestration/guard edges; 5 duplicates retired #47 already carries the runtime mechanism (bats mid-test[[ ]]trap under bash ≤4.0, tests-that-cannot-fail row, COMPAT + bats-gotchas sources). That part is NOT re-ingested here; a comment noting the two additional field reproductions (PR feat(orchestrate,wiki): review-time routing, four-lens Phase 4 pass, insight emission, socratic rework, failure-class pages (#81-#85) #94/fix(orchestrate): ORCH_DIR path token, watch-status stall gating + reason surfacing, merge-on-approval (#87–#90) #102) is left on knowledge: bats/bash-3.2 assertion trap + 4 orchestration/guard edges; 5 duplicates retired #47. The document-editing side (reflow breaks single-line substring anchors; whitespace-normalize new phrase gates) is absent from knowledge: bats/bash-3.2 assertion trap + 4 orchestration/guard edges; 5 duplicates retired #47 and from main → merged intoediting-a-gated-documenthere as new.Routing decision
backend/python/packaging/data-files-and-install-paths.mdpackaging— existing backend/python categories (concurrency, boundaries, serving, language) cover runtime behavior, not distribution/wheel contents; harvested "platforms" hint rejected (platforms = OS-level differences, this is install-mode-level). backend/python index + backend index + root INDEX updatedtesting/data/test-data-and-isolation.mdqa/document-verification/editing-a-gated-document.md