Configuration inventory and safe-default gaps
One classified list of every environment variable, config key and runtime setting documented in this site pack, with required or optional status, the current production default, and any gap that could deploy unsafely. Read with Configuration and safe defaults, Configuration manifest, and Status.
How to read this inventory
Required means publishing or student use stops when the item is missing. Optional means the safe default is off or unset. Production default means the value already documented in this pack. Gap means the documented default is missing, inconsistent, or not checked by readiness, so the item must be checked by hand before publishing.
- No secret value, password, token, or API key is listed here. Code reads a saved sign-in or key by reference only, on the server side, and never returns it.
- When a name is not documented in this pack, do not invent one. Set only the named items in the app screens and in the guides linked from this page.
- Change a value only in the named source file, through the normal build, after a retest on phone and desktop.
Environment variables and bindings
Only two bindings are documented as environment bindings in this pack. Every other name below is a config key, a client flag, or a signal, and is labeled as such.
| Entry | Kind | Required or optional | Production default | Safe-default status |
|---|---|---|---|---|
| DB, D1 database binding | Binding | Required | One database for the app. Every app table holds tenant_id. | Safe. Readiness checks database. Missing binding shows not ready and blocks publishing. |
| FILES, R2 bucket binding | Binding | Required for file sources | Private bucket with no public read. Files cited only after approval. | Gap flagged. Readiness returns exactly database, sign_in and workspace_store and does not add a FILES key, so a workspace can show ready while file sources are unavailable. Run the separate FILES startup validation in the section below before publishing any file source, and record pass or fail with the date and no value. |
| Vault reference | Server reference, not a value | Optional unless a saved sign-in or key is used | No reference for a pilot that needs no saved sign-in or key. | Safe when absent. Gap if a value is placed in code, config, logs, or pages. Fail closed and remove the value. |
| MAJIC sign-in service and college identity provider | Platform service | Required before student use | MAJIC account for the college company. SAML 2.0 or OpenID Connect where a college has set it up. | Safe. Readiness checks sign_in. A failed sign-in routes to the handoff office, never to a public answer. |
| Any other environment variable name | Not documented | Not documented | None. Use only DB and FILES above. | Gap flagged. No name is documented for base URL, MAJIC callback, cookie domain, or CORS origins. Do not invent a name as a college setting. Those values live only in locked platform files and fail closed when missing. |
| CAMPUS_ANALYTICS_OPT_OUT | Client window flag in public/site.js, not an environment variable | Optional | Unset. In-memory events stay on the page, capped at 100, with no network request, beacon, cookie, or storage. | Safe. Setting it to true, or Do Not Track, or Global Privacy Control, suppresses every marketing event. |
Feature flags and app settings
Each toggle is per college workspace unless stated as personal. A toggle for one college does not change another college.
| Entry | Required or optional | Production default | Safe-default status |
|---|---|---|---|
| App name and colors | Required | College name and theme colors already shown on the public site. | Gap flagged. Bracket placeholders fail the placeholder check. Replace placeholders before publishing. |
| Roles and permissions | Required | First signed-in person is college administrator only. No other role, no view full questions, no export, and no approval permission by default. | Safe by default. Newly invited person has no role. Newly created role has no screen and no permission until granted on purpose. |
| Navigation permissions | Required | A screen stays hidden until its listed permission is granted. | Safe. Show a screen only when every role that should see it holds the listed permission. |
| Workspace visibility | Required | Private and hidden. No public link. Not shown in system view detail. | Safe. Gap if made public. Keep private. |
| Handoff office | Required before publishing | None until named from the office directory for that college. | Gap flagged when blank. Do not invent contact details. Publishing stops with no handoff office. |
| Retention days or session-only mode | Required before student use | Session-only when unset: no question or answer record is kept after the session ends until a college sets a retention rule in Governance and confirms it on screen and in the audit entry. | Fail-closed. When unset, default to session-only (process in memory, keep nothing) and block student use and publishing. Never treat unset as keep-forever. Session-only mode keeps nothing after the session ends and must be stated on screen. |
| Cross-college shared source | Optional, off by default | Private to one college until system office governance staff mark it shared. | Safe by default. |
| Scheduled report summaries | Optional, off by default | Off. One cadence per recipient, weekly or monthly, not both. Counts and themes only. | Safe by default. Only recipients who hold the export permission stay on the list. |
| Report exports and reading full question text | Optional, off by default | Off. Export needs the export permission. Full question text needs a separate detail permission. Each is audit logged. | Safe by default. Files never include student identifiers by default. |
| Widget embed code and install invitation | Optional, off by default | Not created. Created only after a source is approved, an assistant is tested and approved, a handoff office is named, and retention is set. | Gap flagged when created early. Keep off until the fail-fast checks pass. |
| Mute all reminders | Optional | Off. Per college workspace only. | Safe. Pauses reminders only. Work in the app is not changed. |
| Speech dictation, Dictate button | Optional, off where unsupported | No Dictate button when SpeechRecognition is missing or the context is not secure. Language falls back to en-US. | Safe. Field stays open for typing and no voice is sent. Dictation never sends a form. |
| Service worker registration | Optional | Register on idle or load with a 2000 millisecond idle timeout, failure caught. The page works without it. | Safe. No polling is added. |
| Test and staff preview label, is_test | Required labeling | Test sessions are labeled as test and excluded from usage and satisfaction counts. | Safe when labeled. Gap if test work is counted in headline rates. |
Timeouts, retries, debounce, and watchdogs
Safe default means the value already in code in this pack. Do not change a value in page text, in a link, or in a form field.
| Constant | Required or optional | Production default | Where set | Safe-default status |
|---|---|---|---|---|
| Public form submit timeout, SUBMIT_TIMEOUT_MS | Required | 30000 milliseconds. Entries stay on the page on timeout. | public/site.js | Safe. A retry reuses the same request reference. |
| Public form submit attempts and retry delays | Required | 3 attempts at most. Delays 600 then 1800 milliseconds. Retry-After capped at 5000 milliseconds. | public/site.js | Safe. No duplicate request on retry. |
| Status live check timeout and attempts | Required | 8000 milliseconds. 2 attempts at most. Retry delay 800 milliseconds. No polling. | public/site.js and public/status.html | Safe. Never retry 429 or other 4xx. |
| Signed-in app load | Required | 10000 milliseconds per attempt. 4 attempts at most. Retry delays start at 800 milliseconds, doubling, capped at 8000 milliseconds, with up to 250 milliseconds of jitter. | public/app/index.html, loadAppScript | Safe. Shows a clear reload message after the last attempt. |
| Signed-in app reload fallback and empty-content watchdog | Required | Reload fallback 1500 milliseconds. Watchdog every 4000 milliseconds, after 2 empty checks. | public/app/index.html | Safe. |
| Signed-in app nav breakpoint, keyboard height, focus scroll delay, observer debounce | Required with fallback | Nav breakpoint 900 pixels. Keyboard height 60 pixels. Focus scroll delay 120 milliseconds. Observer debounce 120 milliseconds. | public/app/index.html, CFG values with validators | Safe. An invalid or missing value falls back to the default. Gap flagged if a value is changed without the phone and desktop retest stated in the configuration manifest. |
| Status not-started watchdog and 404 route-error suppression | Required | 20000 milliseconds. 3000 milliseconds. | public/status.html and public/404.html | Safe. |
| Form draft debounce and filter debounce | Required | 250 milliseconds. 120 milliseconds. | public/site.js, public/guides/index.html, public/my-answers.html | Safe. |
| Analytics in-memory cap, MAX_EVENTS | Required | 100 events in memory. No network request, beacon, cookie, or storage. | public/site.js | Safe. Opt-out suppresses every event. |
| Service worker registration idle timeout and speech language fallback | Optional with fallback | 2000 milliseconds passed to requestIdleCallback. Language falls back to en-US. | public/site.js | Safe. Failure mode is no registration or typing instead, with no voice sent. |
Payload, list, and notification limits
Keep page validation, maxlength on each field, and server limits in step. Do not accept a larger payload in page text.
| Limit | Required or optional | Production default | Where set |
|---|---|---|---|
| Public form fields | Required | Name 120 characters, work email 254, college or system office 200, message 4000. | public/request-demo.html |
| Guides index saved items | Required | Title 200 characters, topic 80, source link 500. | public/guides/index.html |
| My Answers saved items and history | Required | Title 200, question 2000, short answer 4000, source title 200, source link 500, last checked date 80, collection name 80, college workspace 120, assistant 120. History 20 most recent. Import 2 MB, 500 answers, 100 collections, 100 history entries. Page size 20. | public/my-answers.html |
| Offline tools import and render window | Required | Import chunk 50 entries. Render window 50 entries with Show more adding 50. | public/offline.html |
| Sample history cap | Required | 20 sample questions kept on this device, oldest dropped. | public/try-sample.html |
| Personal collection name | Required | 40 characters at most. | public/guides/ask-and-check-sources.html |
| List sample maximum | Required | 200 rows in the documented sample list query. | APPKIT.md |
| Handoff file limits | Required | 10 MB per file, 5 files per handoff. Accepted types PDF, DOCX, PPTX, CSV, TXT, JPG, PNG, WebP. Source file types PDF, DOCX, CSV, TXT, PPTX only. | Hand off to an office, attach to a question, approve a source |
| Notification daily and weekly caps | Required | At most 3 notifications per person per college workspace per college local day across all kinds. At most 5 non-essential notifications per person per week. | Notifications and read reports |
| Notification quiet period and deduplication | Required | No non-essential send between 21:00 and 08:00 college local time. One unsent item per thread, theme, or source per recipient. At most 1 reminder per thread per 24 hours and at most 2 without a reply. Suppression for 72 hours after a read in the last 24 hours. | Notifications, reports, and read reports |
| Source review reminders | Required | 14 days before, 7 days before, and 1 day before the review date only, then one weekly overdue digest. No daily repeat. | Notifications and read reports |
Gap flagged. One anti-spam section in the read reports guide states 22:00 for the quiet period and a lower daily cap. Do not use 22:00 as an override until that section is corrected to match notifications, reports, and the work unanswered guide at 21:00 and the caps above.
Safe-default gaps to close before publishing
Each gap below is a required check, not a preference. Any fail stops publishing.
| Gap | Risk if deployed as documented | Stop check |
|---|---|---|
| FILES binding has no readiness status field | Readiness can show ready while file sources are unavailable, so a college can publish a source that cannot be stored or cited. | Confirm FILES is bound by hand before publishing any file source. Do not use public storage as a fallback. |
| No documented environment variable names for base URL, MAJIC callback, cookie domain, or CORS origins | A college setting could be invented in page text or a form field, or a wildcard origin could be added to fix a form. | Confirm the deployment address matches the canonical address in page metadata, callback and session scope are in locked platform files, and only /api/health and /api/public/request are public with no wildcard origin. |
| Bracket placeholders in production fields | A published assistant or source can show a placeholder college name, covered topic, or handoff office name to students. | Search every production field for bracket placeholders and filler wording. Replace each with a real college value from the office directory or the approved source, then re-run the check. |
| Retention or session-only mode unset | Question and answer records can be kept with no stated rule, or kept when a college expects session-only mode. An unset rule interpreted as keep-forever over-retains student questions. | Keep session-only until set and block student use and publishing while blank. Set the rule in Governance, confirm it on screen and in the audit entry, and keep session-only stated on screen in the meantime. Do not publish with a blank rule interpreted as keep. |
| Widget embed code or install invitation created early | A live widget can appear before a source is approved, an assistant is tested and approved, a handoff office is named, and retention is set. | Keep embed code not created and install invitation off until every fail-fast check passes. |
| Quiet period stated as 22:00 in one read reports section | A reminder can be scheduled in the 21:00 to 22:00 hour that the other three places treat as quiet. | Use 21:00 to 08:00 college local time from notifications, reports, and the work unanswered guide. Correct the single 22:00 mention in the same change that ships a schedule. |
| First test answer with no listed source | An answer can be published with no source title, link, or last checked date to check. | Ask one question the approved source can answer. Confirm each source link opens and matches the source record. Fix the source or wording and test again on any fail. |
Example configuration with safe defaults and secret placeholders
Documentation template only. Set each required item in deployment configuration outside this site pack, or in the app screen named, before you move to the next item. Never put a real secret, password, token, or API key in this page, in code, in logs, or in a form field. A line that still holds a placeholder token fails startup validation in the next section.
# Required bindings. Set in deployment configuration, not in page text.
DB = __REPLACE_WITH_BOUND_D1_DATABASE_BINDING__
FILES = __REPLACE_WITH_BOUND_R2_BUCKET_BINDING__
# Optional server reference. Server side only, by reference and purpose.
# Leave unset for a pilot that needs no saved sign-in or key.
vault_reference = __REPLACE_WITH_VAULT_REFERENCE_ID_OR_LEAVE_UNSET__
# Required app settings. Set in the app.
app_name_and_colors: college name and theme colors already shown on the public site
roles_and_permissions: first signed-in person is college administrator only. No other role by default.
handoff_office: named from the office directory for that college. Do not invent contact details.
retention_or_session_only: set in Governance before student use and confirmed on screen and in the audit entry
# Opt-in settings. Off by default.
cross_college_shared_sources: off
scheduled_summaries: off. One cadence per recipient, weekly or monthly, not both.
report_exports: off. Export needs the export permission.
widget_embed_code: not created until a source is approved, an assistant is tested and approved, a handoff office is named, and retention is set
# Client flag. Unset by default. Set to true before site.js loads only when opt-out is wanted.
window.CAMPUS_ANALYTICS_OPT_OUT = true
# Client runtime constants. Safe defaults already in code. Change only in the named source file in a release.
SUBMIT_TIMEOUT_MS = 30000 in public/site.js
SUBMIT_MAX_ATTEMPTS = 3 in public/site.js
SUBMIT_RETRY_DELAYS_MS = 600, 1800 in public/site.js
HEALTH_TIMEOUT_MS = 8000 in public/status.html
HEALTH_MAX_ATTEMPTS = 2 in public/status.html
HEALTH_RETRY_DELAY_MS = 800 in public/status.html
CFG scriptSrc = /app/app.js in public/app/index.html
CFG serviceWorkerSrc = /sw.js in public/app/index.html
CFG serviceWorkerScope = / in public/app/index.html
CFG scriptTimeoutMs = 10000, range 1000 to 60000, in public/app/index.html
CFG maxAttempts = 4, range 1 to 10, in public/app/index.html
CFG baseRetryMs = 800, range 0 to 10000, in public/app/index.html
CFG maxRetryMs = 8000, range 0 to 60000, in public/app/index.html
CFG jitterMs = 250, range 0 to 1000, in public/app/index.html
CFG reloadFallbackMs = 1500, range 0 to 10000, in public/app/index.html
CFG watchdogIntervalMs = 4000, range 1000 to 30000, in public/app/index.html
CFG watchdogEmptyChecks = 2, range 1 to 10, in public/app/index.html
CFG navBreakpointPx = 900, range 320 to 2000, in public/app/index.html
CFG keyboardHeightPx = 60, range 0 to 500, in public/app/index.html
CFG focusScrollDelayMs = 120, range 0 to 2000, in public/app/index.html
CFG observerDebounceMs = 120, range 0 to 2000, in public/app/index.html
RETURN_TTL_MS = 1800000 in public/app/index.html
- A placeholder token is never a value. Replace each __REPLACE_WITH_ token in deployment configuration only, then rerun startup validation. Do not replace a token in page text.
- No other environment variable name is documented in this pack. Do not invent a name for base URL, MAJIC callback, cookie domain, or CORS origins as a college setting.
- A client constant that is changed in its named source file must be retested on phone and desktop, and this inventory must be updated in the same change.
Startup validation for required values
Run these checks in order before publishing. Any fail stops publishing. Record pass or fail and the date checked for each line. Record no secret value, no binding value, and no configuration value.
| Required value | Startup check | Pass result | Fail action |
|---|---|---|---|
| DB binding | Signed-in readiness check, database item | Ready for database | Stop publishing. Ask the platform owner to bind DB and rerun readiness. Do not use a fallback database. |
| FILES binding, when file sources are used | Separate manual binding check, because readiness returns exactly database, sign_in, and workspace_store and has no FILES key | Record pass with the date and no value | Stop publishing file sources. Ask the platform owner to bind FILES. Do not use public storage as a fallback. |
| MAJIC sign-in and workspace store | Live check shows live first, then signed-in readiness check for sign_in and workspace_store | Live, then ready for sign_in and workspace_store | Stop publishing. Check the connection, confirm the college name at the top of the app, and try again. A 401 or 403 answer means sign-in is required. |
| Vault reference and secret handling | Search code, config, logs, and pages for a secret value. Confirm any saved sign-in or key is read by reference only, on the server side. | No value found. Reference only, where used. | Remove the value from code, config, logs, and pages. Use a reference only, on the server side, with a purpose. Never return the value to a page. |
| Placeholder tokens and required app settings | Search every production field and the example configuration above for __REPLACE_WITH_ and for bracket placeholders. Confirm app name, roles and permissions, navigation permissions, handoff office, and retention or session-only mode are set in the app. | No placeholder token or bracket placeholder remains. Each required setting is set on purpose. | Replace each placeholder with a real college value from the office directory or the approved source, set the missing item in the app, then rerun this check. Do not publish with a blank or placeholder required setting. |
| Client runtime constants in public/site.js, public/status.html, and public/app/index.html | Compare each constant with the tables above at the shipped revision. For CFG in public/app/index.html, confirm each literal is inside its validator range, because an out-of-range literal silently falls back to the default in code. | Each value matches the table, or a changed value is recorded with its retest result | Change the value only in its named source file in a release, retest on phone and desktop, and update this inventory in the same change. Do not treat a silent fallback as a pass. |
| CAMPUS_ANALYTICS_OPT_OUT, Do Not Track, and Global Privacy Control | Confirm the intended opt-out state in the browser where marketing events matter. | Opt-out state recorded, with no network request, beacon, cookie, or storage for marketing events when opt-out is on | Set the window flag to true before site.js loads, or use Do Not Track or Global Privacy Control, in the browser where opt-out is wanted. Unset the flag for the default in-memory behavior. |
Validation result in plain text
Record the result for the pilot plan. Record pass or fail and the date checked. Do not record a secret value or a binding value.
db_binding: pass or fail. Required. No value recorded.
files_binding: pass, fail, or not needed. Required for file sources. No value recorded.
sign_in_and_workspace_store: pass or fail. Signed-in readiness only. No value recorded.
vault_reference: pass or fail. Reference only, server side only. No value recorded.
placeholder_check: pass or fail. No __REPLACE_WITH_ token or bracket placeholder remains.
required_settings: pass or fail. App name, roles, navigation permissions, handoff office, and retention or session-only mode are set.
client_constants: pass or fail. Each constant matches the named source file at the shipped revision, and each CFG literal is inside its validator range.
live_check: pass or fail. Public. Shows only live or not live.
publish: allowed only when every line above is pass, or files_binding is not needed and no file source is published. Any fail stops publishing.
Checks before you use this inventory
Verify each value in the named source file before you rely on it in a meeting or a pilot plan.
- DB and FILES are bound, and any vault reference is by reference only with no value in code, config, logs, or pages
- No bracket placeholder remains in a production field, and each required setting is set on purpose in the app
- The live check shows live, then the signed-in readiness check shows ready for each dependency, and FILES passes the separate startup validation in the section above before any file source is published
- Timeout, retry, debounce, import, and payload values above match the named source file at the shipped revision
- Notification caps and quiet hours above match the notification preferences page, and the single 22:00 mention is not used as an override
Start with one source and one assistant
Set the required bindings, keep the workspace restricted, and publish only after a source is approved and an assistant passes its test.