Persistent local provider service and scientific offering
Dated design and evidence record. Selected design and evidence quotations retain their source line anchors and historical identities; use the current guides for operation.
Record sections
Persistent local provider service and scientific offering Date: 2026-10-23 Status: maintained lifecycle implemented, locally qualified and running; automatic startup enabled Purpose and end state ---------------------- The user requested clean Make targets and parameterization, "No ad-hocery", after the first local deployment used a transient systemd-run command. They also asked for a scientific offering description useful to the API/GUI analysis requester. This is operating work after003's qualified provider/scientific workflow, not a new accuracy claim or another paid Job/model batch. provider/service/{install,start,status,stop,logs,enable,disable} selects an explicit UNIT instance. Installation additionally requires explicit SERVICE_CONFIG: a private standard systemd EnvironmentFile copied from the maintained example. The installed static template runs tools/provider.sh, the SAME host owner behind provider/run, as its main process; no second container orchestration is added. The installer adds only the checkout locator, not generated scientific settings. Actual config/source/runs paths, route modes, literal destinations/interfaces, resolvers and startup/native/drain bounds stay in that operator profile. The existing TOML lifecycle.store_root remains the only configured Attempt store. Credentials remain separate private files captured by the existing startup owner. The template is deployment/nmrnet-provider@.service; profile and TOML examples are config/provider-service.env.example and config/provider.toml.example. Install copies/reloads only. Start is distinct from enable-at-user-manager-start; boot-before-login additionally needs explicitly administered user lingering. Existing profiles/templates belonging to another owner are not silently replaced. UNIT/SERVICE_CONFIG/RUNS_ROOT use the same literal command-line Make capture as the existing operator selectors; ambient values cannot authorize the Make lane. Original ownership and state ----------------------------- Each systemd INVOCATION_ID selects a fresh private runs-root child. A nonblocking lock on the runs root serializes different service instances that accidentally select the same root. RUNS_ROOT/current binds the previous installation to its original host-retired receipt. A previous unconfirmed/missing receipt or orphaned root evidence refuses startup before engine effects. The original host writes that receipt only after exact original grants/containers and its engine client have retired. This does not introduce recovery authority over old worker trees. The current runtime symlink is only a status/log locator and disappears on reboot; a startup refused before recreating it reports its prior path in the host journal, with retained IDs available for the existing provider/logs filter. Per-installation locks, native receipts and durable Attempt effects keep their existing owners. No directory fsync/power-loss or filesystem-quota guarantee is claimed here. The user unit sends TERM to the main host owner, has no forced KILL and retains an unlimited manager stop window. Restart=no prevents automatic repetition over an uncertain original lifetime. Stop requests are asynchronous: acknowledgement is not proof of completed drain; status reports the actual manager state. Native prediction recovery remains with its already qualified bounded owner. Finite30s manager-client deadlines bound operations without turning client timeout into proof of manager-side outcome. Logs reuse bounded host/Docker journals; no stream-file fallback, transcript dump, second diagnostic journal or engine-socket grant to the controller is added. Scientific presentation ownership ---------------------------------- The API/GUI offering reader must see the calculation and required input choices, not merely "Coordinate shifts". The operator TOML example owns the sample copy: released H/C fold0 models, per-atom ppm, supplied coordinate units/file/records or explicitly counted SMILES, separate prepared-geometry atom indices, supplied-H preservation/generated-H handling and the scientific guide. Existing operators can choose their own admitted text; provider-core only transports it. Qualification staging reads the sample's description/offering fields; synthetic ConfigFiles is not production provisioning authority. Local config receives the reviewed sample offering explicitly at cutover. This requires no new model inference. Sources and rationale ---------------------- Inspected sibling code, not a claim of an existing donor systemd installer: - magnet-deploy0619d9ffd92a4326758b442c532aa09496161098, Makefile450-454 and scripts/provider-deployment.sh3103-3140/3805-3833: named lifecycle operations, selected image/readiness checks, provider-first shutdown, preserved state. - secs-repro7356c354368f2355d3ab5cef00cf48c67cea9c2c, deployment/compose.py27-33/ 55-162 and Makefile84-95: explicit owner/project operations, exact image admission and preserved durable data on stop. config/provider.toml.example9-12 supplies scientific meaning and input guidance in operator-owned offering text. - nmrpeak-repro1697dc84dd1d76ae25b04efc8183fd80614000e5, deployment/provider_deployment.py439-496/1783-1830: rendered-plan identity and long graceful provider shutdown before workers. No teardown volumes policy was copied from disposable dapp32 fixtures. - No inspected sibling supplied a persistent user-unit installer. Magnet's selected-image-build.py1121-1205 is a finite one-shot build, not this service; it was not copied as an automatic provider supervisor. Primary systemd references inspected2026-10-23; local manager is systemd255: https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html EnvironmentFile, INVOCATION_ID, RUNTIME_DIRECTORY: literal parameter file, fresh activation identity and runtime locator. No shell evaluation is used. https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html ExecStart environment substitution and Type=exec; manager start differs from the provider's startup admission and API announcement. https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html KillMode=mixed, SendSIGKILL=no: main-owner TERM and preserved unresolved work. Local underlying owners: tools/provider.sh::provider_host_initialize/finish and provider_host_service_installation/previous/locator; process.py store.open before API construction; provider-core AttemptFiles.open's exclusive store-directory flock. These prevent duplicate same-store API ownership; no legacy-unit-specific compatibility branch is added to the generic manager. Cutover and observed qualification ----------------------------------- Install under nmrnet-provider@local.service while the existing transient nmrnet-local.service stays running. Prepare a separate empty service runs root, retain the SAME startup inputs/Attempt store, then intentionally stop the original unit through its existing handler and confirm its original removals. Only then start the persistent unit and read the actual API announcement. Do not adopt or erase the original installation. Actual observations follow after qualification. Observed local cutover and focused proof ---------------------------------------- Implementation b9ec0db; explicit host-entrypoint correction8597c22. Focused contained service tests8/0.320s, staging/composition16/4.066s, operator-input checks26/6.863s and the existing host lane pass. Ruff0.15.15, bash syntax, native systemd255 unit verification and diff whitespace pass. The narrow executable /test-bin tmpfs in the offline service-test lane holds only recording manager stubs; ordinary /tmp remains noexec. No paid model/native scientific rerun ran. Source-aware lifecycle review and isolated scientific/operator text teach-back passed. The reviewed offering's maintained owner is provider.toml.example. The original controller settled0 and all5 original container removals were confirmed before replacement. Preserve its wrapper failure separately: the transient host reported exit2 after a modified Bash checkout tail was read on return from its long-running main function. The existing if-compound now exits explicitly after main; an actual Bash lifetime regression appends a command while main is blocked and proves it never executes. Independent review confirmed this bounded correction. The old failed unit/evidence was not erased or relabelled successful, and no Job/native execution was repeated. make provider/service/start UNIT=local then admitted the maintained instance. The signed API directory GET received its full reviewed scientific offering at 2026-10-23T06:38:13Z (new unit's first invocation). Exact protected response: .work/qualification/service-local-8597c22/001-provider-directory.response.json SHA256a4951d9b2d80ed02fb61d3e20d05a7650a7a97c6f7a5d2057ec06c51ff3c6a13 It contains the H/C fold0/input/units/record/SMILES-count guidance, prepared-atom indices, hydrogen handling, separate geometries and scientific guide, not merely the former "Coordinate shifts". Verification used one signed read through the existing contained API Client; it created no Job, Upload or model request. The maintained stop/start targets were exercised once without analysis work. First invocation0aa4f8b66cd043b6989af1b1b8087de9 retired every original component and published host-retired before the second start was allowed. The SAME Attempt store was kept; second invocation8cac140237da408186f295c685765bbe has a different fresh evidence directory and is active/running with startup admitted. Its main host PID at observation was3551233; current controller CID: 76ef9a987d4339a4210bd05f33ae44dfd533c33ab80e30bcd187be8702784bd1 The actual installed persistent unit is nmrnet-provider@local.service, with Restart=no, KillMode=mixed, SendSIGKILL=no and infinite manager stop timeout. provider/service/logs retrieves both bounded host and controller Docker journals. The startup unit remains disabled: neither enable nor administrator lingering was requested or changed. No reboot/autostart outcome is claimed. Compact functional evidence, excluding keys/config contents and log exports: .work/qualification/service-local-8597c22 Adjacent manifest .work/qualification/service-local-8597c22.sha256: SHA2562200f2bdf56afcbc681dac1e49fed8be41551d5cc3f6e3f63b030fb9247aa4f6 It retains selected manager properties, the original wrapper failure, signed API head/body, first clean host-retirement/removal receipts and current captured plan. The first API response predates the deliberate managed stop/start; current manager/admission evidence is separate. This proves the recorded local lifecycle and delivery, not remote deployment, boot activation or a new accuracy assessment. Automatic startup follow-up, 2026-10-23T07:04Z ------------------------------------------- After the user requested automatic startup, ran the maintained target: make provider/service/enable UNIT=local Then make provider/service/status UNIT=local reported UnitFileState=enabled and ActiveState=active/SubState=running with the SAME invocation and host PID above. loginctl show-user ra --property=Linger reported Linger=yes; this existing setting was not changed. The instance is configured to start at boot without an interactive login. No service restart or host reboot was performed, so this establishes the startup configuration rather than an observed reboot. No Job/model call was made.