Repository navigation
VDLP-50: verify the v2 client against a live FirecREST 2.6.0 - #2
Merged
Merged
Conversation
First contact between this client and a real FirecREST v2 server (demo stack,
f7t-appversion 2.6.0). The client was written against the spec in VDLP-49 and
had never issued a request. Three things the spec did not tell us:
Submit sent snake_case field names (working_directory, standard_output,
standard_error); JobDescriptionModel spells them camelCase. 2.6.0 accepts both
— its models populate by field name as well as by alias — so this never failed
a request and the fields were honoured. That acceptance is an implementation
detail of this version, not part of the contract: a server that drops it would
silently ignore working_directory and run jobs in the wrong directory rather
than erroring. Tags now use the documented names, and the unit test that
asserted the snake_case wire format asserted the wrong thing.
/metadata returns only jobId, script and the three stream paths — no state and
no exit code, identical for a queued and a finished job. Polling "to a terminal
state" was therefore impossible with the calls the client had. State lives on
GET /compute/{system}/jobs/{id}; adds Client.Job over it, JobState.Terminal()
over Slurm's terminal states, and Client.Systems for /status/systems. An
unrecognised state counts as non-terminal so a caller polls again instead of
reporting a wrong outcome.
The CLI could not name a job's output file, which the demo stack's default-path
defect makes necessary; submit gains -name/-out/-err.
Two demo-stack defects found and documented, not worked around, per the issue's
constraints: an absolute standardOutput is concatenated onto the working
directory in the metadata response, and the default output path scontrol
reports (slurm-<id>.out) is not where its sbatch stand-in writes stdout, so
downloading it 404s. The second is an artefact of the fake scheduler and would
not occur against real Slurm.
Full run recorded in docs/verification-v2.md, including what remains unverified:
no real Alps, no real credentials, and no job ever observed PENDING or RUNNING
because the stand-in runs jobs inline.
gofmt, go vet, staticcheck and go test -race are clean, with no dependency on a
running stack.
Co-authored-by: multica-agent <github@multica.ai>
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.
Runs the VDLP-49 client against a real FirecREST v2 server for the first time — the
project's demo stack,
f7t-appversion: 2.6.0, systemfakecluster— and reports whatthat found. The client was written against the specification and had never issued a
request.
Based on
VDLP-49-firecrest-v2-client, notmain, because that branch is stillopen in #1 and is what this work builds on; basing on
mainwould replay #1's commitshere. Retarget to
mainonce #1 merges. Not for merge before then.Outcome
All four commands the issue asked for work: token,
systems,submit,statuspolledto
COMPLETED,download. Getting there surfaced one defect in this client and two inthe demo stack.
:8025, as configuredsystemsfakeclustersubmit201 {"jobId":"14"}status/metadatahas no statedownloadWhat changed, and why
Submit used the wrong field names. The client sent
working_directory,standard_output,standard_error;JobDescriptionModelspells themworkingDirectory,standardOutput,standardError. FirecREST 2.6.0 accepts both —its models populate by field name as well as by alias — so this never failed a request
and the fields were being honoured. Submitting the same job both ways produced
identical scheduler-side metadata. It is still worth fixing: that acceptance is an
implementation detail of this version, not a contract, and a server without it would
silently ignore
working_directoryand run jobs in the user's home instead of therequested directory — a wrong-directory job, not an error. The unit test asserting the
snake_case wire format was asserting the wrong thing and moved with it.
/metadatacarries no job state. It returnsjobId,script, and the threestream paths — nothing else, identically for a queued and a finished job. The issue
asked to poll to a terminal state; with the calls the client had, there was nothing to
poll. State is on the sibling
GET /compute/{system}/jobs/{id}. AddsClient.Jobover it,
JobState.Terminal()over Slurm's terminal states, andClient.Systemsfor/status/systems. An unrecognised state counts as non-terminal, so a caller pollsagain rather than reporting a wrong outcome.
The CLI could not name a job's output file, which the stack defect below makes
necessary.
submitgains-name,-out,-err.Two demo-stack defects — documented, not patched
Per the issue's constraints these are reported rather than worked around.
standardOutputis concatenated onto the working directory in themetadata response: requesting
/home/demo/tmp/snake.outunder working directory/home/demo/tmpreports/home/demo/tmp//home/demo/tmp/snake.out. The file iswritten correctly; only the reported path is wrong.
scontrolreports/home/demo/slurm-13.out; thesbatchstand-in writes stdout to/var/spool/fakeslurm/13/stdout. Downloading the reported path returns a faithful404. This is an artefact of the fake scheduler — the two halves of the stand-in
disagree — and would not occur against real Slurm.
Confirmed correct, unchanged
Authentication works as written (the issue flagged the issuer as a likely first
discovery; it is not one).
ops/downloadis an octet-stream, handled correctly, and isnot
ops/view, so the documented/ops/viewsize-default defect does not apply here.ops/uploadreturns 204 with the client's multipart shape. Themax_ops_file_sizelimit is real — a 2 MiB download against the 1 MiB limit returns 413, surfaced as an
APIErrorwith the status intact.jobIdcomes back as a JSON string, not a number;the client already accepted both and a test now pins both.
Verification
gofmt,go vet,staticcheckandgo test -raceare clean, and the suite stillneeds no running stack. Five unit tests added for the new calls and the terminal-state
predicate.
Not verified: no real Alps system, no real CSCS credentials.
fakecluster'sscheduler is a shell script that runs jobs inline, so no job was ever observed
PENDINGorRUNNINGand the terminal-state logic has only metCOMPLETED. Demotokens are long-lived; refresh under a realistic ~300 s TTL is untested.
Full transcript, including the raw HTTP behind each finding, is in
docs/verification-v2.md.The v1 stack was not touched,
firecrest-agentic-workbenchwas not modified, nothinginside the cloned upstream was changed, and the v2 stack is left running and healthy.