myxce/.gitignore
lei.chen fc33a5da16 admin-plane breakpoint 2: YAML resourcemap wiring + queue payload deep-copy
Breakpoint 2 of the admin-plane gaps (YAML flag/resourcemap wiring), plus
the queue payload ownership fix that the t1 controller segfault of
2026-10-23 12:41:13 traced to.

1. YAML resourcemap wiring (admin-plane-gaps 1.10):
   - schema: Resource.distributions @8 / hostBased @9 uncommented --
     resourcemap had no wire destination at all before this.
   - resobj.c: resobj_init's #if 0 stub replaced with a real deep copy
     (distributions + hbased_defined); resobj_destroy frees them. Deep
     copy is mandatory: the source is myconf->cluster_config, which
     keeps owning and later frees its tree.
   - controller: reconcile_config_resources + seed_sharedinst_from_config
     (cluster.c) seed c->sharedinst for SHARED|GLOBAL resources whose
     distribution carries a value (the license-pool shape), from both
     config_activate_committed paths, ahead of the conf4sched push.
   - xceadmin: mapping.py maps resourcemap -> distributions (only the
     location:[all]+value shape sets SHARED|GLOBAL), build.py renders
     shared=true/distributions; golden expected.bin regenerated.

2. xcesched_push_configs resval double free (t1 12:39:52 abort): the
   seeded push freed the resval entries AND the backing array via
   free_name_val_list, then xlist_fini freed the same array again.
   Detach xreslist before the FREEUP/xlist_fini block (same ownership
   class bug-1506 fixed in sched_worker_change). Latent since inception:
   every pre-1.10 push ran with nresvals==0 and never armed it.

3. queue payload deep-copy (t1 12:41:13 encode_Threshold_list segfault):
   queue_init (create) MOVED the definition's users/hosts/thresholds/
   window payloads out, and queue_refresh_def MOVED them out again --
   but reconcile_config_queues runs MORE THAN ONCE over the same
   cluster_config object (boot: pre-election activation AND phase2's
   build_queues), so the second pass refreshed live queues from the
   drained definition: thresholds became the poisoned (count>0,
   array=NULL) pair, the generated encode_Threshold_list has no NULL
   guard, and the next queue/worker push died on the NULL base.
   Both paths now deep-copy (queue_init and queue_refresh_def); the
   definition keeps its payloads, (NULL/0) genuinely means "no list in
   this config", and reconcile is idempotent. New dup_group_config
   helper in utils.c (the generated code has no GroupConfig dup).
   Mirrors resobj_init's distributions deep-copy and worker.c
   apply_join_state's dup pattern.

4. UT: test_reconcile_thresholds_survive_second_pass drives a triple
   reconcile of a threshold-carrying queue and asserts definition
   intactness plus a real encode_QueueConf -> wire -> decode round
   trip; new test_config_resource_reconcile.c covers seed/deep-copy/
   non-seed classes and idempotent re-seed.

Suites: controller_unit_test 1348/1348, sched_push 4, sched_worker_change 3,
apiserver_push 2, host_runusage 11, xcelib 759, xcealloc_oom 11,
99 scheduler binaries, all worker + harness suites, xceadmin pytest 375.
t1 E2E: boot double-reconcile clean, scheduler rejoin + full conf4sched
push applied, recovered crash-era PEND job reached DONE, 30-job saturation
flow (24 RUN + 6 PEND -> DONE), live gen-12 config activation with
re-push to the connected scheduler -- no crash, all four daemons healthy.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 14:29:29 +00:00

74 lines
2.1 KiB
Text

*~
*.AppImage
result
\#*\#
# Editor swap/backup files
*.swp
*.swo
*~
.*.swp
# Build outputs
src/frontend/apiserver/apiserver
src/frontend/xcecli/xcecli
# Logs and tokens (runtime state)
src/frontend/apiserver/logs/
src/frontend/apiserver/tokens/
# Added by code-review-graph
.code-review-graph/
.remember
graphify-out/
.cache
# --- session checkpoint 2026-06-21: machine-generated / local artifacts ---
.codegraph/
.xce-durability-acked.*
*.bak
ucai-formatter-cache.local.json
# --- session checkpoint 2026-07-03: scratch soak-run output at repo root ---
/codegraph.html
/final_suite_run.log
/xce-durability-*.log
/xce-ha-soak*.log
# --- session checkpoint 2026-07-22: cluster.bin is always freshly built by
# xceadmin now (deploy-ha.sh / run-ha-soak.sh), never a checked-in fixture ---
ha/data/cluster.bin
# --- session checkpoint 2026-08-21: Python bytecode cache, e.g. from
# scripts/gitea-sync.py ---
__pycache__/
*.pyc
# --- session checkpoint 2026-08-21: agent-shell session transcripts can
# capture raw env dumps (secrets) -- never checked in ---
.agent-shell/
# --- session checkpoint 2026-08-24: local-only wolf dashboard auth token,
# never checked in (was committed at 90be04bd; untracked here, LAN-only
# exposure so no history scrub, just stop tracking it) ---
.wolf/dashboard-token
# --- session checkpoint 2026-08-24: capnp-c codegen output, regenerated
# from src/schema/controller.capnp by the build -- never checked in ---
src/lib/controller.capnp.c
src/lib/controller.capnp.h
.wolf/daemon.log
.wolf/token-ledger.json
# --- de-nix build (build/de-nix): vendored wrap-subproject trees are COMMITTED
# (source closure, DEPS.md), but their nested git repos and meson's wrap-hash
# bookkeeping are local artifacts -- never check them in ---
src/subprojects/*/.git/
src/subprojects/*/.meson-subproject-wrap-hash.txt
src/subprojects/.wraplock
# --- de-nix build: packaging output (src/tools/xce-package.sh) ---
src/dist/
# --- bug-1971 evidence archive: local test-failure snapshots (83M of logs),
# produced by src/tools/test-failure-evidence-archive.sh -- never checked in ---
src/testlogs.archive/