chore: untrack committed __pycache__ and scraper output dumps (P4-4) #22

Merged
admin merged 1 commits from chore/untrack-pycache-and-scraper-output into main 2026-09-08 20:48:36 +00:00
Owner

Untracks 63 build/scraper-run artifacts that were committed to git despite
being pure runtime output:

  • 13 .pyc files under services/{api,scrapers}/**/__pycache__/ — already
    covered by .gitignore (__pycache__/, *.pyc), but they predate that
    rule so git kept tracking them (ignore patterns don't retroactively drop
    already-tracked files).
  • 50 scraped brreg.no JSON pages under services/scrapers/output/ — no
    ignore rule existed for this path at all.

Verified before removing: repo-wide grep shows neither set is referenced by
any source file, test, or doc as a fixture — both are just local run output.
Added services/scrapers/output/ to .gitignore so future scraper runs
don't reintroduce this.

No source or test file touched. pnpm test (156 passed / 1 honestly skipped
— the realinfra ST0RE check, which needs live credentials this session
doesn't have) and pnpm run typecheck both pass unchanged before and after.

Matches docs/compliance/BACKLOG.md P4-4, explicitly listed as hygiene
"kan göras i en session utan produktbeslut" (no product decision required).
Picks up unfinished work from an earlier local branch of the same name that
was never pushed/merged.

Mergas EJ av mig — för Simons granskning.

Untracks 63 build/scraper-run artifacts that were committed to git despite being pure runtime output: - 13 `.pyc` files under `services/{api,scrapers}/**/__pycache__/` — already covered by `.gitignore` (`__pycache__/`, `*.pyc`), but they predate that rule so git kept tracking them (ignore patterns don't retroactively drop already-tracked files). - 50 scraped `brreg.no` JSON pages under `services/scrapers/output/` — no ignore rule existed for this path at all. Verified before removing: repo-wide grep shows neither set is referenced by any source file, test, or doc as a fixture — both are just local run output. Added `services/scrapers/output/` to `.gitignore` so future scraper runs don't reintroduce this. No source or test file touched. `pnpm test` (156 passed / 1 honestly skipped — the realinfra ST0RE check, which needs live credentials this session doesn't have) and `pnpm run typecheck` both pass unchanged before and after. Matches `docs/compliance/BACKLOG.md` **P4-4**, explicitly listed as hygiene "kan göras i en session utan produktbeslut" (no product decision required). Picks up unfinished work from an earlier local branch of the same name that was never pushed/merged. **Mergas EJ av mig — för Simons granskning.**
admin added 1 commit 2026-08-14 13:54:31 +00:00
chore: untrack committed __pycache__ and scraper output dumps (P4-4)
Security Scan (SIAX Cloud) / security (push) Successful in 18s
CI (SIAX Cloud) / security (push) Successful in 21s
CI (SIAX Cloud) / quality (push) Successful in 42s
CI (SIAX Cloud) / security (pull_request) Successful in 20s
CI (SIAX Cloud) / quality (pull_request) Successful in 41s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 16s
6c17f0a0d9
13 compiled .pyc files under services/{api,scrapers}/**/__pycache__/ and 50
scraped brreg.no JSON pages under services/scrapers/output/ were committed to
git despite __pycache__/*.pyc already being covered by .gitignore -- they
predate that rule and git does not retroactively drop already-tracked files
that start matching an ignore pattern.

Neither set is referenced by any source, test, or doc as a fixture (verified
via repo-wide grep); both are pure runtime artifacts regenerated on demand.
Untrack them with git rm --cached, delete the local copies, and add
services/scrapers/output/ to .gitignore so scraper runs stop reintroducing
this. No source or test file touched; pnpm test still 156 passed / 1 honestly
skipped (realinfra ST0RE check) after the change.

Matches docs/compliance/BACKLOG.md P4-4, explicitly flagged as hygiene doable
without a product decision. Picks up unfinished work from an earlier,
never-merged branch of the same name.
Author
Owner

Status: BLOCKED by branch protection, not by CI, not superseded, and not actually conflicted.
Re-verified against main = 364b7643 (after PR #26 landed).

Why it cannot be merged. The PR touches .gitignore (+3 lines), and
protected_file_patterns on main contains the literal .gitignore. Gitea rejects the whole
PR on that basis — including the 63 file deletions that are not protected at all. There is no way
to split the .gitignore line out and still have it land while the pattern stands.

Not superseded — content proof, not path existence. All 63 files this PR removes are still
tracked on today's main:

git ls-tree -r --name-only origin/main | grep -cE '__pycache__|services/scrapers/output/'
  63            # = 13 .pyc + 50 brreg_page_*.json

and zero of them survive the merge:

git ls-tree -r --name-only $(git merge-tree --write-tree origin/main pr/22) \
  | grep -cE '__pycache__|services/scrapers/output/'
  0

Landing set against today's main: 64 files changed, 3 insertions(+), 50 deletions(-).

The .gitignore merge is not a regression. The merged file keeps main's newer entries and
adds this PR's:

+# scraper run output (local dumps written by services/scrapers/*.py, never source)
+services/scrapers/output/

mergeable: false in the API is stale, not a real conflict. Gitea's DB row says
pull_request.status = 1 (PullRequestStatusChecking), conflicted_files = NULL — the conflict
check has been sitting in "checking" since 2026-08-14 and never finished. A real conflict looks
different: the closed PR #21 has status = 0 with
conflicted_files = [".devcontainer/devcontainer.json", "compose.dev.yaml"]. Independently,
git merge-tree --write-tree origin/main pr/22 exits 0 despite the branch being 26 commits
behind. Do not rebase this branch to "fix" a conflict that does not exist.

CI is green on head 6c17f0a0: both required contexts success (2026-08-14T13:55:03Z /
13:54:43Z), combined state success.

What Simon has to do: relax protected_file_patterns on main long enough to merge, then
restore it. Splitting the PR does not help here.

Generated with Claude Code

**Status: BLOCKED by branch protection, not by CI, not superseded, and not actually conflicted.** Re-verified against `main` = `364b7643` (after PR #26 landed). **Why it cannot be merged.** The PR touches `.gitignore` (+3 lines), and `protected_file_patterns` on `main` contains the literal `.gitignore`. Gitea rejects the *whole* PR on that basis — including the 63 file deletions that are not protected at all. There is no way to split the `.gitignore` line out and still have it land while the pattern stands. **Not superseded — content proof, not path existence.** All 63 files this PR removes are still tracked on today's `main`: ``` git ls-tree -r --name-only origin/main | grep -cE '__pycache__|services/scrapers/output/' 63 # = 13 .pyc + 50 brreg_page_*.json ``` and zero of them survive the merge: ``` git ls-tree -r --name-only $(git merge-tree --write-tree origin/main pr/22) \ | grep -cE '__pycache__|services/scrapers/output/' 0 ``` Landing set against today's `main`: **64 files changed, 3 insertions(+), 50 deletions(-)**. **The `.gitignore` merge is not a regression.** The merged file keeps `main`'s newer entries and adds this PR's: ``` +# scraper run output (local dumps written by services/scrapers/*.py, never source) +services/scrapers/output/ ``` **`mergeable: false` in the API is stale, not a real conflict.** Gitea's DB row says `pull_request.status = 1` (PullRequestStatusChecking), `conflicted_files = NULL` — the conflict check has been sitting in "checking" since 2026-08-14 and never finished. A real conflict looks different: the closed PR #21 has `status = 0` with `conflicted_files = [".devcontainer/devcontainer.json", "compose.dev.yaml"]`. Independently, `git merge-tree --write-tree origin/main pr/22` exits 0 despite the branch being 26 commits behind. **Do not rebase this branch to "fix" a conflict that does not exist.** CI is green on head `6c17f0a0`: both required contexts `success` (2026-08-14T13:55:03Z / 13:54:43Z), combined state `success`. **What Simon has to do:** relax `protected_file_patterns` on `main` long enough to merge, then restore it. Splitting the PR does not help here. Generated with [Claude Code](https://claude.com/claude-code)
admin merged commit into main 2026-09-08 20:48:36 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/0pt#22