surveys-wears-kit: the brand survey theme is never INSTALLED in LimeSurvey's templates table, so templateNameFilter silently falls back to vanilla — and writes defaulttheme=vanilla into settings_global, which then outranks config.php forever #1326
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1326
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
20260908T145808Z(artifacts/verdict.json: 23 legs, 22 green,firstRedLeg: surveys-wears-kit, commitf1b439bd) went red on the LAST leg of the surveys cycle.tick-surveys,deploy-surveys(583s) andsurveys-healthywere all green — the port stands up and its RemoteControl health gate opens. Only the kit failed:namePASSED (<title>E2E Drive</title>—config.config.sitenamereached the page,internal/clan/surveys.go:338).accentandlogodid not. The check itself is sound:app/tests/e2e/fixtures/brandreach.ts:117-122declares the surveys token set{name, accent, logo}straight off the DDR 0225 table, andreadMissingKitMarks/findLogoRef(brandreach.ts:383-404) hunt#619793in the served CSS and anylogo-named same-origin asset ref. Three sibling ports passed the same walk on this drive.What the door actually served
From the leg's trace (
artifacts/provision-brands.live-…/trace.zip,3-trace.network+resources/bf509e31…html, the 200/50146-byte root response):<body class=" vanilla font-noto lang-en brand-logo">— the theme that rendered isvanilla, notidss_brand.css/base.css,css/theme.css,css/noTablesOnMobile.css,css/custom.css,./css/survey-list.css) plus core assets. Novariations.cssanywhere — the brand theme's stylesheet was never published, so#619793never reached the CSS haystack.<img>on the page are/tmp/assets/66d1f53d/survey_list_header.pngandpoweredby.png— stock.<div class="navbar-brand logo-container d-none d-md-block">renders empty. Nologo-named ref exists to find.Root cause — verified against the pinned source
Realized
/nix/store/rs1f1f5smj81i1x4vv2578aqijwd0r4q-source(limesurvey-6.15.14+250924, the pinned package). The chain:application/controllers/SurveysController.php:34—Template::model()->getInstance(getGlobalSetting('defaulttheme')).getInstance→getTemplateConfiguration→Template::templateNameFilter()(application/models/Template.php:166-218).templateNameFiltervalidates the name against the DB:self::model()->findByPk($sTemplateName)on{{templates}}(Template.php:179).idss_brandhas no row there — the surveys-brand oneshot only writes files to disk (internal/clan/surveys.go:353-419); nothing ever registers the theme intemplates/template_configuration.idss_brand(config.php,internal/clan/surveys.go:339), so no recursion → it falls into the "default survey theme is not installed" branch (Template.php:196-206): it walksself::model()->search()->getData()and takes the first installed row. Perapplication/core/LsDefaultDataSets.php:1015, that isvanilla— exactly the theme the served HTML names.SettingGlobal::setSetting('defaulttheme', $sTemplateName)(Template.php:208) writes adefaulttheme=vanillarow intosettings_global. BecauseLSYii_Application::setConfigs()merges the DB settings last (application/core/LSYii_Application.php:194-195,$this->config = array_merge($this->config, $dbConfig)), that row now outranks config.php permanently — this fault is sticky across redeploys, and any fix must clear or overwrite it.So the whole
defaulttheme = "idss_brand"half of the apply semantic is inert, and always has been. On a fresh installsettings_globalcarries nodefaultthemerow (installer/create-database.php:496-517seeds only the three admin-creation-email settings), which is why the first request is the one that poisons it.Two further defects in the same theme, behind the first
Even with the theme registered, the drive would still be missing marks:
internal/clan/surveys.go:396-398emits<files><css><filename>css/variations.css</filename></css></files>. LimeSurvey's manifest uses<add>—themes/survey/fruity_twentythree/config.xmlandthemes/survey/vanilla/config.xmlboth read<files><css><add>css/base.css</add>…</css>…</files>.<filename>is not a tag the package builder reads, sovariations.csswould never be published even from an installed theme.internal/clan/surveys.go:417installs the bytes as"$theme/files/logo"— no extension, and the emittedconfig.xmlhas no<options>block at all. The fruity/vanilla lineage renders its logo only when the theme optionsbrandlogo=onandbrandlogofilepoint at it (themes/survey/fruity_twentythree/config.xml,<brandlogo … options="on|off">off</brandlogo>/<brandlogofile … parent="brandlogo">./files/logo.png</brandlogofile>). Default isoff, so the file sits on disk unreferenced.variations.css(surveys.go:405-412) declares only--brand-primary/--brand-primary-hover/--brand-text-on-primary/--brand-background. Neither vanilla nor fruity_twentythree consumes those custom properties — fruity's colour comes from a fixedcssframeworkvariation set (css/variations/theme_apple.css…). So even served, the hex would satisfy the drive's string hunt while painting nothing, which is not what "Carries your name, logo & colours" promises a community.The compiled kit itself is fine —
state/clan-config/idss/brand/svc-surveys/survey-brand.confcarriesprimaryColor=#619793,sitename=E2E Drive, and the 70-bytelogoobject landed beside it.guest-failed-units.loglists 0 failed units, so the oneshot ran clean; it simply produced a theme LimeSurvey will not load.Suspected layer
internal/clan/surveys.go—renderSurveysBrand/renderLimeSurveyDaemon'sdefaulttheme. Not the harness:app/tests/e2e/fixtures/brandreach.tsreported exactly what the door served.Why I refused (rule 3 — design/one-way, not a fast-lane repair)
The fix lives in product code and is not a mechanical two-way repair:
idss_brandneeds one of: a direct SQL insert intotemplates+template_configurationfrom the deploy oneshot (new mysql-client dependency, new ordering againstlimesurvey-init, new idempotency rules, and a schema coupling to LimeSurvey's DB that survives upgrades); or driving LimeSurvey's ownTemplateManifestimport from a PHP one-liner; or flipping the globalforce_xmlsettings_for_survey_renderingsogetTemplateConfiguration(Template.php:380-391) skips the DB for every theme render. Those are materially different deploy-behaviour and one-way-door choices. There is no console command for it (application/commands/has no theme-install verb).go test ./internal/clan/only asserts the emitted Nix text; nothing here can stand a LimeSurvey up and confirm the theme installs and renders. The only proof would be a paid re-drive.Rules 1 and 2 were not the blocker — no assertion would have been touched, and the diff could plausibly fit the cap.
For whoever takes it
settings_globalpoisoning (Template.php:208) means an already-deployed community stays onvanillaeven after the theme is installed correctly. The fix must delete/overwrite that row, and this is worth adocs/GOTCHAS.mdentry in the same commit (the LimeSurvey "DB settings outrank config.php" class, sibling of #196).fruity_twentythreeis seeded in{{templates}}(LsDefaultDataSets.php:1072), so<extends>fruity_twentythree</extends>resolves fine —idss_brand's own missing row is the sole blocker at step 3.#619793and references alogo-named same-origin asset that fetches with real bytes (brandreach.ts:392,:397-404,:432).drive
20260908T145808Zred atsurveys-wears-kit:the live Surveys (https://surveys.e2e-drive.idss.internal:44963) is missing kit marks [accent; logo (no logo-named asset referenced by the page)] — its surface's ruled token set (DDR 0225) promisesevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260908T145808Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedClaimed by the babysitting agent (Ben: babysit #1277). The healer's autopsy stands; ruling the three open choices under ADR 0174 where they are two-way, proving against the pinned LimeSurvey locally (the #1323 method) before landing, and routing anything one-way to Ben. ready-for-session removed.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
bug+no-triage(state role) — this ticket is confirmed and already in flight, so it is carried out of both automated queues rather than re-queued.Why this state, not a queue label:
ready-for-agent. The healer's autopsy (verified against the pinnedlimesurvey-6.15.14source) is sound: the swarm cannot prove a fix here —go test ./internal/clan/only asserts the emitted Nix text, and nothing in the sandbox stands a LimeSurvey up to confirm the theme installs, renders#619793, and serves alogo-named asset. Proof requires the local pinned-LimeSurvey method (#1323).ready-for-session(awaiting a session). @ben's comment (2 min after filing) records that the babysitting agent — a session — has already claimed it under his babysit of #1277, will rule the three theme-registration choices under ADR 0174 where two-way, prove locally via the #1323 method before landing, and route the one-way residue to him. He deliberately removedready-for-session. It is in-progress, not queue-available, so re-addingready-for-session(which advertises "a session may pick this up") would be false.ready-for-human. The three registration remedies (SQL insert into{{templates}}/template_configuration; PHPTemplateManifestimport; flipforce_xmlsettings_for_survey_rendering) are deploy-behaviour choices — revertible by commit/config and provable by the #1323 local method — i.e. two-way doors a session rules. The genuine one-way residue (the DDR 0225 colour decision — what an arbitrary community hex repaints on a member-facing survey surface) is drafted-and-shipped-as-default now with the accept riding the next digest per ADR 0174; it does not block the ticket, and the human isn't the current owner — a session is.Why
no-triageis the right formal state: a session already owns this under Ben's direction, so it belongs in neither the swarm queue (.sandcastle/list-ready-tasks.shreads onlyready-for-agent) nor the session sweep.no-triagekeeps triage automation and both queues out of an actively-owned ticket. It stays surfaced through itspriority+rehearsal-183wiring to the standing drive, so it is not lost.Why a two-way door: a label change, fully revertible. If the babysitting session releases this unfinished, drop
no-triageand re-triage (it would then becomeready-for-session, pinned to the host holding the evidence —matou-workstation, per the body). Veto anytime.Landed
902a65f0. Your autopsy was exact — all three findings plus four more the pinned source/live instance turned up (compatibility block,views/dir, child file-list inheritance, thesanitize_filenamehelper in console context). The rule-3 refusal resolves two-way under ADR 0174: (1) registration rides LimeSurvey's OWN code path —TemplateManifest::importManifest+SettingGlobal::setSetting(defaulttheme)in a console command loaded through console.php's ownYII_CONSOLE_COMMANDSextension point (no SQL coupling, noforce_xmlsettings); (2) colour = the upstream's own single-colour-variation semantic (fruity_twentythree's four variations differ in the primary hex alone — the kit accent replaces it in the pinned package's sheet), so nothing new is designed; (3) proof = the GENERATED script + command against the real pinned 6.15.14 in docker, from a poisoneddefaulttheme=vanillawith no theme dir, twice → door serves the child variation (131×#619793),logo.png200/69 B,defaulttheme=idss_brand.TestSurveysCohost_EvalSmokegreen against real nixpkgs. GOTCHAS #197. Veto anytime.path— two normal-priority definitions, eval preflight excludes the gateway, nothing deployed #1329userthemerootdiris derived from the DEFAULTuploaddirbefore config.php is merged, and a theme it cannot see is sile… #1330