Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/integrated-notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Installed notebook workflows (native science NOT_RUN)

on:
workflow_dispatch:
pull_request:
paths: ['python-client/**', 'developer-tools/klab-service-simulator/**', '.github/workflows/integrated-notebooks.yml']
push:
paths: ['python-client/**', 'developer-tools/klab-service-simulator/**', '.github/workflows/integrated-notebooks.yml']

permissions:
contents: read

jobs:
installed-notebook-workflows:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
PYTHONPATH: ${{ github.workspace }}/python-client/tools
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python -m pip install './python-client[dev,analysis,notebook,local]' ./python-worker './developer-tools/klab-service-simulator[test]' 'mypy>=1.14,<2'
- name: Require kernel and analysis dependencies rather than skipped acceptance
run: python -c "import nbformat,nbclient,nbconvert,ipykernel,matplotlib,psutil,numpy,rasterio,xarray"
- name: Shared evidence runner and distinct notebook recipe controls
run: python -m pytest -q python-client/tests/tools/test_verify_onboarding_matrix.py python-client/tests/tools/test_verify_restoration_matrix.py python-client/tests/tools/test_verify_notebook_matrix.py
- name: Exact installed guards, local kernel smoke and actual public notebook workflows
run: python python-client/tools/verify_notebook_matrix.py --capture-current-source --output-directory notebook-evidence
- name: Types and fatal lint
run: |
python -m mypy --check-untyped-defs --follow-imports=silent --ignore-missing-imports python-client/tools/verify_notebook_matrix.py
python -m ruff check python-client/tools/verify_notebook_matrix.py developer-tools/klab-service-simulator/tests/test_notebook_client.py --select E9,F63,F7,F82
- uses: actions/upload-artifact@v4
if: always()
with:
name: installed-notebooks-not-native-scientific-acceptance
path: notebook-evidence
43 changes: 43 additions & 0 deletions .github/workflows/integrated-scientific-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Installed scientific snapshots (real provider science NOT_RUN)

on:
workflow_dispatch:
pull_request:
paths: ['python-client/**', 'developer-tools/klab-service-simulator/**', '.github/workflows/integrated-scientific-snapshots.yml']
push:
paths: ['python-client/**', 'developer-tools/klab-service-simulator/**', '.github/workflows/integrated-scientific-snapshots.yml']

permissions:
contents: read

jobs:
installed-scientific-snapshot-reference:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
PYTHONPATH: ${{ github.workspace }}/python-client/tools
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python -m pip install './python-client[dev,analysis,tabular,notebook,local]' ./python-worker './developer-tools/klab-service-simulator[test]' 'mypy>=1.14,<2'
- name: Require optional dependencies rather than skipped acceptance
run: python -c "import numpy,pandas,rasterio,xarray,psutil"
- name: Runner and reference-science recipe controls
run: python -m pytest -q python-client/tests/tools/test_verify_onboarding_matrix.py python-client/tests/tools/test_verify_scientific_matrix.py python-client/tests/tools/test_verify_restoration_matrix.py python-client/tests/tools/test_verify_notebook_matrix.py
- name: Installed multishard, frozen-recorded and offline known-answer matrix
run: python python-client/tools/verify_scientific_matrix.py --capture-current-source --output-directory scientific-snapshot-evidence
- name: Shared-runner onboarding regression
run: python python-client/tools/verify_onboarding_matrix.py --capture-current-source --output-directory onboarding-regression-evidence
- name: Types and fatal lint
run: |
python -m mypy --check-untyped-defs --follow-imports=silent --ignore-missing-imports python-client/tools/verify_onboarding_matrix.py python-client/tools/verify_scientific_matrix.py
python -m ruff check python-client/tools/verify_onboarding_matrix.py python-client/tools/verify_scientific_matrix.py --select E9,F63,F7,F82
- uses: actions/upload-artifact@v4
if: always()
with:
name: installed-snapshots-not-real-provider-science
path: |
scientific-snapshot-evidence
onboarding-regression-evidence
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ def test_owned_exact_sdk_kernel_await_shared_job_local_cancellation_reader_close
import asyncio, json, os
from klab_client import (AsyncClient, AsyncGraphBrowser, AsyncGraphProjection,
Endpoint, ObservationRequest, RectangularGeometry)
from klab_client.errors import AuthorizationError
ready = json.loads(os.environ["KLAB_SIM_NOTEBOOK"])
urls = ready["endpoints"]
def options():
token = ready["credential"]
return dict(credential=token, agent_name="alice",
def options(other=False):
token = ready["other_credential"] if other else ready["credential"]
return dict(credential=token, agent_name="bob" if other else "alice",
runtime_service_id=ready["service_ids"]["runtime"],
reasoner=Endpoint(urls["reasoner"], token),
resources=Endpoint(urls["resources"], token),
Expand Down Expand Up @@ -73,6 +74,14 @@ async def tracked_status(**kwargs):
restored = await reader.restore_handle(saved)
assert (await restored.fetch_data((0,))).values == (100,)
assert (await observations[0].fetch_data((399,))).values == (195,)
async with AsyncClient(urls["runtime"], **options(other=True)) as foreign:
try:
await foreign.attach_context(contexts[0].id)
except AuthorizationError:
denied = True
else:
raise AssertionError("Foreign notebook reader unexpectedly gained access")
assert (await observations[0].fetch_data((0,))).values == (100,)
projection = AsyncGraphProjection(AsyncGraphBrowser(contexts[0]))
page = await projection.load(observations[0], relationships=("MEASURED",))
assert len(page.page.links) == 1 and page.page.partial
Expand All @@ -82,7 +91,8 @@ async def tracked_status(**kwargs):
assert not refreshed.invalidated and "UNKNOWN" in projection.view.consistency
return dict(own_wait_cancelled=cancelled, jobs_resumed_without_recreate=True,
other_wait_completed=True, same_principal_reader_only=True,
reader_close_preserved_work=True, independent_contexts=2,
reader_close_preserved_work=True, independent_contexts=2,
collaboration_denied=denied,
verified_endpoint_cells=4, graph_partial=True,
backend="SIMULATED", java_science="NOT_RUN")
finally:
Expand All @@ -101,11 +111,12 @@ async def tracked_status(**kwargs):
nbformat.v4.new_code_cell(
"assert report['own_wait_cancelled'] and report['other_wait_completed'] and report['reader_close_preserved_work']\n"
"assert report['graph_partial'] and report['backend']=='SIMULATED'\n"
"assert report['collaboration_denied']\n"
"print('SIMULATED notebook acceptance only; no Java scientific execution')")])
notebook.metadata.kernelspec = {"name": "klab-owned-async", "display_name": "owned", "language": "python"}
env = {key: value for key, value in os.environ.items() if not key.startswith("KLAB_") and key != "PYTHONPATH"}
env["PYTHONPATH"] = str(Path(klab_client.__file__).resolve().parents[1])
env["KLAB_SIM_NOTEBOOK"] = json.dumps(simulator | {"credential": "sim-token-alice"})
env["KLAB_SIM_NOTEBOOK"] = json.dumps(simulator | {"credential": "sim-token-alice", "other_credential": "sim-token-bob"})
execute_private_kernel(notebook, tmp_path, env)
check_outputs(notebook, ["sim-token-alice", "sim-token-bob", "sim-admin-control"])
identity = json.loads(notebook.cells[0].outputs[0].text)
Expand All @@ -119,6 +130,7 @@ async def tracked_status(**kwargs):
assert not list(tmp_path.glob("private-kernel-*"))
report = json.loads(notebook.cells[1].outputs[0].text)
assert report["independent_contexts"] == 2 and report["verified_endpoint_cells"] == 4
assert report["collaboration_denied"] and report["reader_close_preserved_work"]
state = control(simulator)
assert not any(state["counts"].values())
assert sum(row["path"].endswith("/submit") for row in state["trace"]) == 2
Expand Down
48 changes: 48 additions & 0 deletions notes/python-roadmap-execution/AB_COMPLETION_LEDGER.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# A+B completion ledger — ongoing campaign

PR310 publishedb63d61e54 scientific-snapshot exact-child484/3/52PASS,35controls/types-
lint/onboarding190/1/18PASS;56reviewedmaps450missing. Ready for exact-headCI; parent309
CI/merge remains pending. No native science/finalrow promotion; safety proceeds next.

Final exact-child scientific snapshot matrix484SDK/3isolated/52publicHTTP PASS,
onboarding190/1/18regressionPASS,35controls/types-lintPASS. Binary/JSON checkout and
installed oracle bytes plus examples pinned before/after; nested-I child imports exact
selected installedSDK. Earlier484/3/52positive run remains narrower predecessor with
no exact-child claim.56reviewedmaps450missing across506; native scienceNOTRUN.
Receipt integrated-scientific-snapshot-installed-20261107.json recorded; simulator
scanempty. Parent309ready87cc87c16 CI pending; childscientific delivery next, then safety.

## Scientific-snapshot integration active while309 CI runs

309ready87cc87c16 final expanded24/3/3notebook matrix/30controls/types-lintPASS;
exact-head CI watcher active, no merge/checkpoint yet. Active child scientific-snapshot
branch integrates multishard/recorded-export/analysis/offline groups. Added runtime
oracle byte custody to shared runner; initialpreflight refused packaging-only
.gitattributes source/package difference, zero changed runtime assets. Metadata remains
support-pinned; only repo policyfile excluded from installed runtime-oracle equality.
New output corrected matrix running; actual group counts pending.56reviewedmaps450
missing across506; no native science or fullfunctional promotion.9runnable/42IDs/history.

PR309 published507ca4ef8: final expanded24guards/3kernel-smokes/3publicHTTPnotebooks
PASS,30controls/types-lintPASS; predecessor24/3/2 retained. Ready for exact-head CI;
ordinarymerge/checkpoint remain.308verifiedmerged/all38checksPASS. Nine runnable,
zero finaldispositions; next independent scientific-snapshot acceptance proceeds.

## PR308 verified merged; expanded notebook matrix passes

PR308 merged3fe92c7c192c6db36ed75cf506d6fb1c1a576c00 at2026-11-07T22:39:36Z,
exactabfc54bda8978115228cdc4c6141a24858b80b3e/all38checksPASS; remote/local ancestry
checkpoint verified. Installed453SDK/32lifecycleHTTP/30providerHTTP plus190/1/18
onboarding regression,20controls/68governance/17linkedPASS vs17nativeNOT_RUN retained.
All42originalIDs/history preserved;9runnable/zero finaldispositions. No native retention,
incarnation/TTL/rights/science or final-row acceptance promoted.

Active notebook branch/noPR: final expanded installed24guards/3local-kernel-smokes/
3publicSDK-onlyHTTPnotebooksPASS, zero failures/errors/skips. Actual Job/graph Bob
denial and owner-preservation added; existing separate principal-race notebook already
covered foreign denial and now joins recipe alongside raster notebook. First24/3/2
positive receipt retained by path/hash as predecessor, not final expanded acceptance.
30shared-runner/recipe/queue/ordercontrols/types/fatallintPASS; simulator scan empty.
Exact interpreter/SDK imports, unchanged secret/JWT/output/cell guards and owned
kernel/session cleanup checked. Kernel calls remain unmeasured by owning-thread trace;
47reviewedmaps459missing unchanged. Final notebook CI/ordinary delivery remain;
scientific-snapshot/safety/packaging and broader RC-P0 assertion review continue.

308 final local receipt includes17linked simulatedPASS(1319SDK414sim116worker)
vs17nativeREAL_NOT_RUN/expectedexit3.453/32/30matrix+onboarding190/1/18regression,
20runner-recipe-HTTPcontrols/types-lint68governancequeueorderingPASS. No simulator
Expand Down
22 changes: 22 additions & 0 deletions notes/python-roadmap-execution/RESUME_FULL_ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Resume the full Python A+B+C campaign

Active feat/python-integrated-scientific-snapshots/uncommitted/noPR. Final exact-child
484SDK/3isolated/52HTTPmatrix and onboarding190/1/18regressionPASS,35controls/types-lint
PASS. Receipt integrated-scientific-snapshot-installed-20261107.json. Shared runner now
pins binary/JSON runtimeoracles and examples; installedfixtures matchcheckout except
repository.gitattributes pinned as supportmetadata, not packaged runtime asset. Both
isolated-Iprocess levels bootstrap/verify exactselectedinstalledSDK. Earlierpositive
matrix retained as narrowerpredecessor; nativeprovider science NOTRUN.56maps450missing.
Parent309ready87cc87c16 exactheadCIwatcher active;308merged3fe92c7c1/all38PASS.
Need childdelivery/parentmerge then safety/packaging/RC-P0 assertionreview.9runnable,
42originalIDs/history/zero dispositions. Finalsimulatorscanempty.

Latest308MERGED3fe92c7c1 at2026-11-07T22:39:36Z/exactabfc54bda/all38checksPASS,
remote/local checkpoint verified.42originalIDs/history9runnable/zero finaldispositions.
Active feat/python-integrated-notebook-acceptance/noPR: final expanded24guards/3local
kernel-smokes/3actualpublicHTTPnotebooksPASS;30sharedrecipequeuecontrols/types-lintPASS.
Final output integrated-notebook-expanded-final; receipt integrated-notebook-installed-
20261107.json supersedes first24/3/2recipe by path/hash, no overwritten raw evidence.
Job/graph Bobdenial now actual; separate existing principal-race notebook already had
foreign denial and now included. Kernelcalls explicitly unmeasured;47maps459missing.
Lastsimulatorscanempty; owned kernels/session cleanup checked. Need notebookdelivery
then scientificsnapshot/safety/packaging/RC-P0review. Native gates remain distinct.

Latest307MERGED0f50b3b52 at2026-11-07T22:23:23Z/exact4c21ec9ec/all19checksPASS,
remote-localcheckpointverified.42originalIDs/history12runnable/zero dispositions.
Current feat/python-integrated-restoration-acceptance/uncommittedsource/noPR.453SDK/
Expand Down
Loading
Loading