surveys-wears-kit: the brand survey theme is landed in the state dir but LimeSurvey reads user themes from the read-only store — userthemerootdir is derived from the DEFAULT uploaddir before config.php is merged, and a theme it cannot see is sile… #1330
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1330
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The failure
Drive
20260908T180009Z(drive 8, #1277, onf99c325e), signature01a1c359036d: 22 legs green —deploy-surveysandsurveys-healthyboth held — red atsurveys-wears-kit, the SECOND red at this leg with #1326's theme registration in place:Name reached; colour and logo did not.
The evidence
artifacts/legs.json— 23 legs, 22 green, the single red as quoted;artifacts/verdict.jsonfirstRedLeg: surveys-wears-kit.logs/guest-failed-units.log— "0 loaded units listed":surveys-brandran CLEAN. Its console command verifies both thetemplatesrow and thedefaultthemesetting and returns 1 otherwise (internal/clan/surveys.go:399-411), so it believed it had registered the brand theme.artifacts/brand/surveys.png— the public survey list (LimeSurvey's root controller:internal.php:36defaultController => 'surveys'→SurveysController::actionPublicList, which renderslayout_survey_list.twigundergetGlobalSetting('defaulttheme')). It wears the sitename "E2E Drive" and otherwise stock Bootstrap 5:#0d6efdlinks,#f8f9fa/#dee2e6/#212529chrome, the LimeSurveysurvey_list_header.png, an EMPTYnavbar-brand. Zero#619793pixels.state/clan-config/idss/brand/svc-surveys/survey-brand.conf—primaryColor=#619793,sitename=E2E Drive,logo=logo. The kit compiled correctly; it never reached the theme.The defect
Read at source against the pinned LimeSurvey 6.15.14+250924 (
/nix/store/inj1nizfn0jwpnlid0sfz3r360bp2khh-limesurvey-6.15.14+250924) and the pinned nixpkgs (/nix/store/lr5ld8f0qbyhjx3nr9mxfvg4cndvpggp-source):application/config/config-defaults.php:746derivesuserthemerootdirfrom$config['uploaddir']— itself:738off$config['rootdir'] = getcwd()(:43).configarray AFTER that derivation and never recompute it:core/LSYii_Application.php:151-170(web) andcore/ConsoleApplication.php:52-86(console, which additionally re-derives it off the store root inconfig/console.php:36,42).uploaddiranduserquestionthemerootdirand NOTuserthemerootdir(nixos/modules/services/web-apps/limesurvey.nix:381-383), andinternal/clan/surveys.go:327-340never set it either.So the user survey-theme root stayed
<package>/share/limesurvey/upload/themes/survey— the read-only Nix store — whilerenderSurveysBrand(internal/clan/surveys.go:451) lands its theme at/var/lib/limesurvey/upload/themes/survey/idss_brand.Both ends then fail silently, which is why every unit stayed green:
TemplateManifest::setPath(models/TemplateManifest.php:1076-1104) finds no dir underuserthemerootdir, callsSettingGlobal::setSetting('defaulttheme', defaultfixedtheme)and re-points itself at the STOCK theme's manifest.TemplateManifest::importManifest(:706-751) therefore registered the nameidss_brandcarrying the stock theme'sview_folder/files_css/options — nobrandlogo=on, no brand variation — and the command's own row checks passed on a lie.Template::checkTemplateXML(models/Template.php:300) looks forconfig.xmlunderuserthemerootdirthenstandardthemerootdir, finds neither, returns false;templateNameFilter(:158-219) falls back to the first installed row and PERSISTS that intosettings_global, whichLSYii_Application::setConfigsmerges last, over config.php.sitenamestill reached because it is a plain config key — which is exactly what made the red read as "the theme registered but the accent didn't take".The suspected layer
The surveys port's render (
internal/clan/surveys.go) — an upstream DERIVED-path contract, one layer below the four this drive has already found (options #191, unit environment #192, app feature switches #194, merge priority #195). Recorded as GOTCHAS #198.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
This is a mechanical repair in product code, not a design decision, and it is a two-way door.
Why it is mechanical, not design. Nothing about what a community sees is being decided here. DDR 0225 already ruled that the Surveys surface carries name, logo and colours; #1326 already built the brand theme and its registration. The render already derives
<stateDir>/upload/themes/surveyas the theme's home — it simply never told LimeSurvey to read user themes from there, because LimeSurvey derives that path from a base the module overrides and nixpkgs forgot the derived key. Settinguserthemerootdirbeside nixpkgs' ownuserquestionthemerootdirmakes the code do what it already meant. No new default, no changed message, no route or secrets shape, no security posture.Why it is two-way. The whole change is one config key plus a guard in a console command. Reverting is
git revert f67fe543— the key disappears from the renderedconfig.phpand the port returns exactly tof99c325e's behaviour. No migration, no infra state outside the checkout, no schema or dependency change, nothing one-way about it.Proven by which test.
TestRenderSurveys_UserThemeRootDirIsTheWritableThemeHome(internal/clan/surveys_test.go) was written FIRST and observed failing on the unfixed render, then passing: it pins the key, pins that the theme root and the landed theme dir come from ONE derivation (surveysUserThemeRootDir), and pins the console guard.TestSurveysCohost_EvalSmokecarries the artifact-level proof against real nixpkgs — the decodedservices.limesurvey.confignow reads"userthemerootdir":"/var/lib/limesurvey/upload/themes/survey"alongside nixpkgs' survivinguploaddir/tempdir/userquestionthemerootdir(the #1322 merge guard still holds), and nixpkgs serialises that attrset verbatim into theconfig.phpLimeSurvey reads (limesurvey.nix:49-60).Second half of the repair. The console command now refuses when the theme is not under
Yii::app()->getConfig("userthemerootdir"), naming the root LimeSurvey actually read. That convertssetPath's silent stock-theme substitution into a loud unit failure, so this class can never again pass its own verification on a lie. It adds a check; it removes none. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260908T180009Zred atsurveys-wears-kit(sig 01a1c359036d) — self-fixed on the fast lane, commitdb322c716178fd467a3c85ed3dc6b9fcdad59080; checks: targeted (red-first):go test ./internal/clan/ -run TestRenderSurveys_UserThemeRootDirIsTheWritableThemeHome→ FAIL before the fix (surveys_test.go:221: config.php must point LimeSurvey's user survey-theme root at the WRITABLE theme home … "(lib.mkDefault { userthemerootdir = \"/var/lib/limesurvey/upload/themes/survey\"; })" missing), PASS after. package:go test ./internal/clan/→ ok (18.2s), all 12TestRenderSurveys_*PASS. real-nixpkgs eval smoke:IDSS_EVAL_SMOKE=1 go test ./internal/clan/ -run TestSurveysCohost_EvalSmoke -v→ PASS (39.4s) — gateway evaluated to/nix/store/qpaky2b6cl5yvyyjl9ncg24jja6z8pxa-nixos-system-gateway-26.11.20260612.173d0ad.drv; the decodedservices.limesurvey.configreads"config":{"RPCInterface":"json","config":{"defaultlang":"en"},"defaulttheme":"idss_brand","sitename":"E2E Drive","tempdir":"/var/lib/limesurvey/tmp","uploaddir":"/var/lib/limesurvey/upload","userquestionthemerootdir":"/var/lib/limesurvey/upload/themes/question","userthemerootdir":"/var/lib/limesurvey/upload/themes/survey"}— the new key lands beside nixpkgs' own and the #1322 merge guard still passes; the #1329 PATH guard still passes; the teeth half still fails on the phantomuploadsDiras it should. generated-PHP syntax (the new console guard rides inside a Nix indented string): dumpedsurveysThemeCommandPHPand rannix shell nixpkgs#php83 --command php -l→ "No syntax errors detected"; the Nix side is proven by the eval smoke itself, which resolvedYII_CONSOLE_COMMANDSto a store path. trees:go test ./internal/...→ no failures;go test ./control-plane/...→ no failures.go build ./...→ clean;gofmt -l internal/clan/→ clean;go vet ./internal/clan/→ clean. commit shape: 3 files, 45 changed non-test lines (internal/clan/surveys.go34/3,docs/GOTCHAS.md8/0;surveys_test.go32/0 is a test file), one commit, not pushed. rails self-check: the ENTIRE diff removes exactly three lines, all in product code and all mechanical (renderLimeSurveyDaemon(&b, cfg, pkg)→…, store), its signature, andthemeDir := store + "/upload/themes/survey/" + surveysBrandTheme→ the shared derivation) — zero removed lines in any test file, no removed or edited assertion/expectation, no removed test or leg declaration, no added skip; no.sandcastle/rehearsal-*or.forgejo/workflows/path in the diff.. evidence:/home/swarm/swarm/Matou/idss/test-results/private-path/20260908T180009Zon matou-workstation.close-report for #1330 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope