Skip to content

DRAFT (phase 3, after T063): T077, F10.1 run, as T007 batch H amends it: .[local] and generate-and-open --local (plan 034) - #83

Closed
brettheap wants to merge 1 commit into
mainfrom
build/034-p3e-t077-f10-1-run
Closed

brettheap wants to merge 1 commit into
mainfrom
build/034-p3e-t077-f10-1-run

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Arc: neutral-product-standalone-operability

Plan 034 (specs/034-opendox-standalone-operation/tasks.md, read at openxFactory main ec9308c8), phase-3 slice P3-E, the door, its second task:

The form: an empty commit, and the run quoted here

  • No Run-F task has landed yet. T074 (F13.1) and this task are the plan's only two "Run F…" tasks, and both are unticked.
  • The nearest precedents are the checkpoint runs, T049 (openxFactory#1204) and T063 (#1218). Each quotes its runs in an openxFactory evidence/ file and ticks itself in the same PR. Those are holder tasks with no repository tag.
  • T077 is tagged [oDc], and its slice row lists no files (P3-E: "none, unless T075's run finds a gap in how the bundle is served"). openDox-code has no evidence directory.
  • So this PR's one commit is EMPTY. It changes no file and carries the run's record and the Lane: and Arc: trailers, and the run is quoted below.
  • T077's tick ([x] and a Landed: line) belongs to a later plan-034 bookkeeping PR in openxFactory, as #1214 and #1217 ticked earlier tasks.

If the holder prefers an evidence file instead (in openxFactory's specs/034-opendox-standalone-operation/evidence/, as the checkpoints do), the quote below moves there unchanged.

The command: F10.1 as batch H amends it

The command block was copied verbatim from #1144's tasks.md at openxFactory ec9308c8, and batch H's two amended lines were applied. The diff from the text as written is exactly those two lines:

-pip install .
+pip install ".[local]"
-opendox generate-and-open --repo-root "$R" --repository fixture --no-open --port 8080 &
+opendox generate-and-open --local --repo-root "$R" --repository fixture --no-open --port 8080 &
the command as run (sha256 2358bd8f…)
set -euo pipefail
W=$(mktemp -d)                                        # scratch space, resolved at run time (never a host path)
python -m venv --clear "$W/v10"                      # a FRESH environment: nothing already installed stands in
. "$W/v10/bin/activate"
pip install ".[local]"
if python -c "import openxdox" 2>/dev/null; then echo "FAIL: sibling present"; exit 1; fi
opendox --help >/dev/null                       # the console script MUST exist
export GIT_AUTHOR_NAME=fixture GIT_AUTHOR_EMAIL=fixture@example.invalid GIT_COMMITTER_NAME=fixture GIT_COMMITTER_EMAIL=fixture@example.invalid
R=$(mktemp -d)/plain-documents
cp -r tests/fixtures/plain-documents "$R"   # a FRESH repository (preamble)
git -C "$R" init -q
git -C "$R" add -A
git -C "$R" commit -qm fixture
opendox generate-and-open --local --repo-root "$R" --repository fixture --no-open --port 8080 &
SERVER=$!
trap 'kill "$SERVER" 2>/dev/null || true' EXIT   # cleanup cannot mask the verdict
ready=0
for _ in $(seq 1 30); do
  if curl -sf http://127.0.0.1:8080/ >/dev/null; then ready=1; break; fi
  sleep 1
done
test "$ready" -eq 1                              # a server that never started FAILS here
curl -sf http://127.0.0.1:8080/ > "$W/bundle.html"   # no pipeline: curl's status is the status
grep -qi '<html' "$W/bundle.html"                # and it is really the bundle

How it was run

  • The tree: a fresh clone of openDox-code at main 8e377823, clean, run from the checkout's root as F10.1 requires.
  • The environment was scrubbed with env -i. The only variables set were HOME, USER, LOGNAME, SHELL, LANG=C.UTF-8, a minimal PATH (with a python → python3 shim for F10.1's python -m venv), TMPDIR and OPENDOX_STATE_DIR. No GIT_*, XF_*, PG* or other OPENDOX_* variable reached the run.
  • OPENDOX_STATE_DIR was $HOME/.local/state/p3-t077. Its socket path is $HOME/.local/state/p3-t077/postgres/run/.s.PGSQL.5432, 59 bytes, under the 107 limit. It sits outside /workspace/projects, which is mode 777 on this host, an ancestor the bundle refuses.
  • The tools: Python 3.12.3, git 2.43.0, curl 8.5.0. pip install ".[local]" resolved from PyPI with no constraints file, as F10.1 is written. It installed 35 distributions, among them opendox-0.0.0, pixeltable-pgserver-0.6.0, psycopg-3.3.6 and fastapi-0.142.2.
  • Port 8080 was checked free just before the run. The check is the wrapper's, not F10.1's text. T075 found that on a shared host another run's server can answer F10.1's fixed port, and F10.1's readiness loop cannot tell whose server answered.

The run: rc 0

Started 2026-10-03T15:35:23Z. pip's progress lines are elided; every other line is shown:

# head 8e3778238e2469d07051838403628b4f00b4b5a0  script f10-1-amended.sh sha256 2358bd8f76abc855
# port 8080 free before the run
… pip install ".[local]" (35 distributions) …
  database $HOME/.local/state/p3-t077/postgres/run (bundled, pid 3658850, migrations applied now: ['0001', '0002'])
wrote $HOME/.local/state/t077-tmp/ideation-dashboard-o5chwovk/snapshot.json
  repository=fixture kind=opendox-snapshot
  source_revision=0dfdaad726df620ce9a4611f59a655f10db3b734
  generated_at=2026-10-03T15:35:44+00:00
  documents=8 clusters=2 possibles=1 staged_topics=1 changes=2 keywords=28
  validation: opendox-snapshot: 0 violations, by opendox.validator, over its packaged copy opendox-snapshot (sha256 f9e3e111af1d)
  serving http://127.0.0.1:8080/index.html
  snapshot http://127.0.0.1:8080/snapshot.json
http://127.0.0.1:8080/index.html
  serving until interrupted (Ctrl-C to stop)
rc=0
# bundled postgres still running after the run: 0

What the verdict rests on:

  • set -euo pipefail held to the end, so every line before the last passed:
    • the sibling check;
    • opendox --help, the console script's first assertion;
    • the readiness loop, which succeeded within 30 s;
    • curl -sf of /;
    • grep -qi '<html'.
  • The page was this run's own bundle. The fetched $W/bundle.html is byte-identical to the checkout's src/opendox/web/index.html (7556 B). The run's own server printed serving http://127.0.0.1:8080/index.html, and the port was free before it started.
  • The bundled PostgreSQL started as the entry point's child and migrated ['0001', '0002']. It was gone after the run: F10.1's kill "$SERVER" stopped the entry point, and the server stopped with it.
  • The installed opendox is the venv's own (…/v10/lib/python3.12/site-packages/opendox/__init__.py). In that venv, none of openxdox, ideation_dashboard, doc_health or corpus_adapter_openxfactory is importable.

Supplementary: T075's widened fetch, all 42 files

This is not F10.1's text. It is the same amended command, with the port guard and, after F10.1's last line, T075's fetch of every bundle file (f10-1-widened.sh, sha256 de67316b…). It was run with the same wrapper, from the same clean checkout, at 2026-10-03T15:36:24Z. rc 0:

  database $HOME/.local/state/p3-t077/postgres/run (bundled, pid 3684186, migrations applied now: ['0001', '0002'])
  serving http://127.0.0.1:8080/index.html
served app.js … served views/wheel.js   (42 lines, one per file, each compared byte for byte with the tree)
F10.1 (as amended), widened to 42 files: PASS
rc=0
# bundled postgres still running after the run: 0

Observations, not gaps

  • pip install ".[local]" from a checkout leaves an untracked build/ directory, plus src/opendox.egg-info/, which .gitignore already ignores. .gitignore has no build/ line, so a second run in the same checkout starts from a dirty tree. F10.1 runs once, from a clean checkout, so its verdict is unaffected. Ignoring build/ would be a one-line change elsewhere.
  • F10.1's fixed --port 8080, as above. The wrapper's guard and the byte comparison of / are what make this run's verdict its own.

🤖 Generated with Claude Code

Plan 034 T077 (#1144's F10.1). It runs F10.1 as batch H amends it, with
pip install ".[local]" and opendox generate-and-open --local, which starts
the bundled server. That makes this task the run itself, quoted in its PR
(its PR body has the command and the output). The task's files
are "none (a run)", so this commit is empty: it carries the run's record
and its trailers, and no change to the tree.

The run was made on main 8e37782, from a clean clone, in a fresh venv,
with a scrubbed environment (env -i: no GIT_*, XF_*, PG* or other
OPENDOX_* setting; LANG=C.UTF-8). OPENDOX_STATE_DIR was
$HOME/.local/state/p3-t077, whose socket path is 59 bytes. Port 8080 was
checked free first. The result was rc 0:
- opendox --help exited 0, and no sibling was importable;
- the bundled PostgreSQL started and migrated ['0001', '0002'];
- the snapshot validated with 0 violations;
- GET / served the bundle's own index.html, byte-identical (7556 B);
- the bundled server was gone after the run.
T075's widened fetch, run the same way, served all 42 bundle files (rc 0).

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 15:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@brettheap
brettheap requested a balanced review from Copilot October 3, 2026 15:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Superseded by opensoft/openxFactory#1223, which carries the F10.1 run as plan 034 evidence (holder ruling; checkpoint precedent #1204/#1218).

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

@brettheap brettheap closed this Oct 3, 2026
@brettheap
brettheap deleted the build/034-p3e-t077-f10-1-run branch October 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants