fix(lib): thread from_host through the wire format and the job-submit interning object (bug-1676, gitea #44)

- src/schema/controller.capnp: JobSubmitData gains
  fromHost @10: Text $C.mapname("from_host") -- auto-regenerates
  controller.capnp.c/h via the existing meson capnpc-c custom_target.
- src/include/xce/types.h: job_submit_data_t gains char* from_host.
- src/lib/jobj.c: jobsub_init/jobsub_destroy (the hand-written,
  ref-counted, content-deduped job-submit interning object -- not
  auto-generated) thread from_host through the deep-copy, the dedup
  identity comparison, and the destroy path.

Closes the wire-format half of the round-trip: from_host now survives
from the apiserver's submission all the way through the controller and
back on every subsequent job-state push, and rides along for free in
the existing WAL_JOB_SUBMIT persistence across a controller restart.
Did not need to touch job.c's build_job_submit_payloads() (bare
pointer borrow of the already-decoded submit struct) or any WAL
apply-path code (capnp_encode_job/decode_Job already generically
handle the whole xce_job_t including its full .submit sub-struct).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
This commit is contained in:
Rongsong Shen 2026-08-24 15:14:42 +00:00
parent fe8818b19b
commit 363709b032
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
4 changed files with 65 additions and 6 deletions

View file

@ -531,6 +531,7 @@ struct JobSubmitData $C.mapname("job_submit_data_t") {
description @7: Text $C.mapname("job_description");
resreq @8: Text;
startinfo @9: JobStartInfo $C.mapname("start_info");
fromHost @10: Text $C.mapname("from_host");
}
struct JobSubmit $C.mapname("xce_job_submit_t") {