Commit Graph
47 Commits
Author SHA1 Message Date
Gmer4Lfe e91a74d31f Sweep finished runs for misconfigurations instead of waiting to be told
Nothing in Varaverk fires when a job ends, so this picks up run records that completed
since the last pass rather than adding a hook to forty scripts. Ahead of stability in the
cycle on purpose: a wrong port is not fixed by rebooting the machine.
2026-08-09 19:38:02 -04:00
Gmer4Lfe 500f9d92c8 Redact credentials on the way into a stored chat
A stored transcript is replayed into a later prompt when reopened, so a key typed while
changing a setting would be handed back to the model on every subsequent turn.
2026-08-09 19:07:34 -04:00
Gmer4Lfe d9225d06d9 Route a General Chat question to the profile that fits it 2026-08-09 00:36:13 -04:00
Gmer4Lfe 37784bce6c Offer Troubleshoot as a profile, and say plainly when it has no log 2026-08-09 00:25:52 -04:00
Gmer4Lfe 3a45c18555 Document today's restructures, and give data/ a README that ships with it 2026-08-09 00:01:05 -04:00
Gmer4Lfe f1603349cc Put everything Varaverk persists under one root, state included 2026-08-08 23:26:46 -04:00
Gmer4Lfe 0f92609425 Give the AI subsystem one profile table and one collection, read everywhere 2026-08-08 22:35:37 -04:00
Gmer4Lfe ea0c713c89 Put the assistant on the dashboard, where the questions actually occur to you 2026-08-08 22:01:13 -04:00
Gmer4Lfe 8b0c2f6d1b Tools had no gear, so nineteen scripts had no Info and Settings at all 2026-08-06 22:57:05 -04:00
Gmer4Lfe f2d0e18f2c Ask about a run from the row it is on, and stop spending context on health checks when the run was clean 2026-08-06 21:51:55 -04:00
Gmer4Lfe 4347fc5f07 Capture the dock phrasing that worked, so it keeps working 2026-08-06 21:38:41 -04:00
Gmer4Lfe ce0cbd868c Write down the routing every bug so far produced, and check it without asking the model 2026-08-06 21:34:05 -04:00
Gmer4Lfe 2658082607 Explain mode: show what a question would be given and why, without asking the model 2026-08-06 21:27:26 -04:00
Gmer4Lfe 55aa7f968f A phrase list missed one word order, and the assistant answered a log question with a command that re-runs the job 2026-08-06 21:17:57 -04:00
Gmer4Lfe 0882942164 General Chat now hands a Varaverk question up to the Assistant instead of telling the operator to do it 2026-08-06 20:56:47 -04:00
Gmer4Lfe 917ff43795 Profile permissions belong in one table, because scattered they hid a capability chat was never meant to have 2026-08-06 20:51:19 -04:00
Gmer4Lfe d562644581 State the no-citation rule for run evidence in the contract itself, since as an amendment it lost 2026-08-06 18:49:18 -04:00
Gmer4Lfe 02aa73bb8d Chat invented a log inspection when asked how a run went, and the rundown cited passages it had not read 2026-08-06 18:48:01 -04:00
Gmer4Lfe 0fa871ef61 The run-outcome gate ignored the profile, so chat could be handed a log it is promised it never sees 2026-08-06 18:45:55 -04:00
Gmer4Lfe 815ceef276 A question about how a run went should arrive with the run attached, not with directions to the log panel 2026-08-06 18:43:12 -04:00
Gmer4Lfe 269ef9b2de Verify a bug report's component and evidence before filing it 2026-08-05 21:25:00 -04:00
Gmer4Lfe 2f8af3a1b7 Say the bug was recorded locally, because that is what happened 2026-08-05 20:55:56 -04:00
Gmer4Lfe 2c5e412d91 File AI-detected Varaverk defects as deduped reports, surfaced on the AI tab and counted in the coffee report 2026-08-05 20:48:54 -04:00
Gmer4Lfe 9d4a62fa5e Have the troubleshooter suspect configuration before it suspects Varaverk 2026-08-05 20:33:01 -04:00
Gmer4Lfe 714d97dd49 Add an incident journal the troubleshooter reads back, and thinking for diagnosis 2026-08-05 20:26:56 -04:00
Gmer4Lfe 5a813eb4c8 Add a troubleshooting profile with the scoped log, and a deterministic conf-key lookup 2026-08-05 20:18:05 -04:00
Gmer4Lfe 185abdb442 Add a scope-aware assistant dock to the scheduler right panel 2026-08-05 19:56:02 -04:00
Gmer4Lfe 969a85f303 Record token usage per turn and show daily, weekly and all-time totals by host 2026-08-04 18:04:46 -04:00
Gmer4Lfe 452bf0e544 Route definitional questions to the narrative docs, and tolerate misspelling
"What is Varaverk" matched the PURPOSE intent, so retrieval returned every
script's one-line purpose and the model answered that the context does not
define the system — while README.md sat in the index unread. A definitional
question with no explicit filter now goes to kind=readme.

Varaverk is a coined word with no spell-check, so it arrives as varavrk,
veraverk, varavek. Edit distance catches those without a pattern that needs
extending per typo. This is search, not identity — a near-miss only widens a
document search, unlike hostname resolution where it must never resolve.
2026-08-03 18:17:56 -04:00
Gmer4Lfe 9d189e9dbf Flag destructive operations in generated scripts
Custom Scripts run as root on a schedule, so the expensive mistake is not
tangled logic — it is a simple script aimed one directory too high. The prompt
now asks for the dry-run form and an explicit line on what gets destroyed, and
a scan of the generated code blocks raises a banner regardless of whether the
model bothered to warn. Scans fenced code only, so prose mentioning rm does not
trip it.
2026-08-03 18:09:47 -04:00
Gmer4Lfe a3098ee67c Tell Code Sketcher to admit an invented flag rather than blame the version
Given its own broken script and the real error, it produced the correct fix but
explained --no-overwrite away as 'introduced in a later version of rsync'. No
rsync version has ever had that flag, and the operator is on current 3.4.4 — so
the repair was right and the diagnosis was a second fabrication that would send
someone hunting a nonexistent upgrade.
2026-08-03 17:48:52 -04:00
Gmer4Lfe 73305a0cd1 Fix the chat-profile detector missing two-segment conf keys
The pattern required three underscore-separated segments, so RSYNC_ENABLED and
AI_ENABLED slipped through — exactly the names most likely to be asked about.
Also dropped the case-insensitive flag, which made the SCREAMING_CASE branch
match ordinary lowercase words containing underscores.
2026-08-03 17:39:50 -04:00
Gmer4Lfe e58f0352a7 Stop General Chat inventing answers about Varaverk internals
Asked what mover_stop.sh does, it invented a description and dressed it in
real memory facts so it read as authoritative — the exact failure the profile
split exists to prevent. A polite instruction in a system prompt is not a
guard. The rule now leads and is absolute, and a deterministic check repeats
it immediately before the message whenever the question names a shell script,
a SCREAMING_CASE conf key, or Varaverk itself. Detection can only make the
model more cautious, so a false positive costs a redirect, not an answer.
2026-08-03 17:38:43 -04:00
Gmer4Lfe 8d393a1e1c Add three chat profiles: Varaverk Assistant, General Chat, Code Sketcher
Explicit buttons rather than an automatic router. Misclassifying a Varaverk
question as chat produces a confident invention about the user's system, which
is exactly what retrieval exists to prevent — with buttons there is no hidden
heuristic to be wrong and the strict profile is the default you land on.

Only Varaverk Assistant retrieves; the other two would be carrying passages
that cannot help write a folder-copy script. Memory goes to all three, since
that is what lets chat know the setup without claiming authority over it.
History depth is per profile and set server-side: retrieval costs ~2500 of
16384, so the profiles that skip it can hold a real conversation. Code
Sketcher is told to flag flags it is unsure of, after it invented
rsync --no-overwrite.
2026-08-03 17:36:24 -04:00
Gmer4Lfe d0b3588f6c Give the assistant a standing memory file
A small operator-written file handed to the model at the start of every
conversation — who you are, how this install is set up, what has already been
decided. Injected ahead of the retrieved passages and marked operator-authored
so it outranks anything they contradict, and never cited as a source.

Deliberately not indexed and deliberately under DATA_DIR: it changes
constantly, vector similarity is the wrong way to retrieve things you were
told to remember, and gitignoring it keeps personal notes out of a pushed
repository. The character cap is a context budget — this text costs its share
of 16k on every single turn.
2026-08-03 17:11:27 -04:00
Gmer4Lfe 198532e280 Send all health checks as live state, not only the failing ones
Asked what was wrong, it answered "AI_ENABLED=false" — read from the conf
template, which records the shipped default, while the live value was true.
Passing checks are what tell the model the current value of a setting;
without them a documented default fills the silence. The prompt now states
explicitly that live state overrides any documented default.
2026-08-02 17:45:41 -04:00
Gmer4Lfe 237156c46f Add config-vs-reality health checks, loaded models, and log evidence
The failures this subsystem actually has are configuration drift, so each
check names the setting to change rather than reporting that retrieval
failed. Notably it catches a conf model tag that is no longer installed, and
an index built by a different embedder than the one configured — vectors
from two models are not comparable, and that failure returns confident
nonsense rather than erroring. Diagnostic questions also get recent log
warnings, attached only then because they cost budget the passages need.
2026-08-02 17:40:43 -04:00
Gmer4Lfe 264ba57cbb Add the AI tab — grounded chat over the documentation index
Token and poll rather than SSE, so the api layer keeps one response
convention and reuses the pattern manual_sync already proved. History is
capped at three turns because the model is only fully offloaded at 16384
context and unbounded history would cross that silently. The tab exists
only while AI_ENABLED is true, rejected server-side and not merely hidden.
2026-08-02 17:32:17 -04:00
Gmer4Lfe 987313e7dc Document the PHP api layer and fix what documenting it exposed
Writing down what each endpoint actually guarantees made the places it
didn't obvious — shell arguments reaching a crontab or a bash -c
unescaped, master.conf written without tmp+rename, and conf edits that
could be saved without ever being parsed.
2026-08-02 10:11:39 -04:00
Gmer4Lfe 1ed6b92118 Document the Unraid platform layer
The folder that translates the OS into Varaverk's vocabulary had no docs of its own, so the
adapter contract and the three-layer web UI were only discoverable by reading the code.
2026-08-01 23:20:52 -04:00
Gmer4Lfe c377ddfcca Complete the header template across Partnership, Kernel, Deployment and Plugin
Finishes the pass: every script now documents its safeguards, and the deliberate absences
in the sourced libraries are recorded so they are not "corrected" later.
2026-08-01 22:44:23 -04:00
Gmer4Lfe cdce877601 Add a second GPU card to the monitor page
The 3080 was invisible because the stats parser only ever described GPU 0.
2026-08-01 20:37:58 -04:00
Gmer4Lfe 69189bbf18 Fix dead-variable and exit-code bugs found in codebase-wide audit
Same audit as the orchestrator standardization pass (2a062e5), extended to
every remaining script. Found the same class of bug independently recurring:
ramdisk_stop.sh checked $LOG (nothing assigns it, should be $ENABLE_LOGGING),
partnership_onboard.sh checked $LOG_MODE (same issue), emby_session_report.sh
checked $TRANSCODE_PCT which was never computed so the high-transcode alert
could never fire, and storage_migrate.sh never called detect_hosts() so
$MY_ID was empty, silently breaking the post-migration host*.conf update.
partnership_manager.sh used `local` at top-level script scope (invalid outside
a function) and had two master.conf path references missing "Configurations/".

Along the way: several scripts (share_setup.sh, conf_sync.sh,
downloaders_reset.sh, transcode_cleanup.sh, transcode_manager.sh,
remote_arr_cache_writer.sh, upgrade_webhook_handler.sh) had no explicit
trailing exit code, so they always reported success regardless of real
failures. play_state_sync.sh was missing the partnership gate its own header
documented, so remote play-state sync ran even with PARTNERSHIP_ENABLED=false;
it also always exited 0 on sync errors. arr_profile_enforcer.sh and
webhook_setup.sh hand-rolled their own flag parsing instead of common.sh's
parse_args, so --log silently did nothing on either.

system_watchdog.sh was itself an un-standardized mini-orchestrator — converted
to the shared run_orch_child()/JOB_PASS/JOB_FAIL pattern, added the missing
failure notification, and fixed dry-run to pass --dry-run down to children
instead of skipping them outright. Also fixed a stale webgui_watchdog.sh path
in master.conf.template that would break system_watchdog.sh on any fresh
install.

Closed a sibling-drift gap: radarr_cleanup.sh and sonarr_cleanup.sh were
missing lidarr_cleanup.sh's tracked-count percentage-drop safety gate and its
"not configured on this host, skip cleanly" guard — both now match Lidarr's
7-gate model.
2026-07-03 17:35:30 -04:00
Gmer4Lfe f92ee4064b Add full banner headers to all scripts across the codebase
Every script now has the established header format: PURPOSE with ─────── separator,
OPERATIONAL MODEL, DESIGN PRINCIPLES, OPERATIONAL SAFEGUARDS, CONFIGURATION, and
RUNTIME MODES — structured with full ====== banner sections throughout.

Orchestrators converted from compact ── inline format to full banners. Stale
emby-fallback and dirty sync references removed from Plugin/user_script_plug-in.sh.
2026-06-26 18:50:05 -04:00
Gmer4Lfe 6153283de4 move conf templates and conf_populate to Deployment/; add rogue-prevention rules to CLAUDE.md 2026-06-14 13:18:08 -04:00
Gmer4Lfe 3964f6fb46 audit echo vs log across all scripts — outcomes always visible, verbose for per-item loops 2026-06-14 12:40:15 -04:00
Gmer4Lfe 9c3ace95a7 Auth stack certs tab, arrs db fallbacks, cert monitor cache, conf parser fix
- Auth stack: fold cert monitor into Auth Stack page as fourth tab (Certs);
  remove standalone cert page and top-level tab
- cert_monitor.sh: write JSON status cache to State_Files/cert_status.json
  after each run; expose per-domain days/expiry via _CERT_DAYS/_CERT_EXPIRY globals
- api/cert.php: new — serves cached cert status; falls back to configured
  domains as UNKN when no cache exists; POST action=run triggers live check
- arrs db fallbacks: vv_arr_cleanup_stats/discovery_stats/recovery_stats now
  read from data/*.db files when log JSON files don't yet exist
- config.php vv_conf_vars(): unescape bash \$ → $ so passwords with dollar
  signs read correctly from conf files
- host1.conf: fill in HOST1_NPM_USER/PASS and HOST1_LLDAP_USER/PASS
- Partnership adapter pattern: Unraid-specific container logic extracted to
  Plugin/unraid/Partnership/; platform-agnostic structure stays in Partnership/
- First-run wizard: uniform multi-step flow for all hosts; HOST2 pull moved
  to checklist; auto SSH keygen and API key creation on save
- api/checklist.php: live setup checklist with pull_master action
- Fullscreen toggle: hide Unraid header/menu; state persists via localStorage
2026-06-05 23:17:30 -04:00