Skip to content

docs(env): audit .env.example completeness — issue #782 - #785

Merged
molecule-ai[bot] merged 1 commit into
mainfrom
chore/issue-782-env-example-audit
Apr 17, 2026
Merged

docs(env): audit .env.example completeness — issue #782#785
molecule-ai[bot] merged 1 commit into
mainfrom
chore/issue-782-env-example-audit

Conversation

@molecule-ai

@molecule-ai molecule-ai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Closes #782.

What changed

File Change
.env.example Added HIBERNATION_IDLE_MINUTES=60 with comment
.env.example Added PLUGIN_ALLOW_UNPINNED= with comment
docker-compose.yml Added both vars to platform service env block

Audit results

Items 1–3 (task-specified vars)

Var Was in .env.example? Was in docker-compose.yml? Action
HIBERNATION_IDLE_MINUTES ❌ Missing ❌ Missing Added to both
PLUGIN_ALLOW_UNPINNED ❌ Missing ❌ Missing Added to both
ADMIN_TOKEN ✅ Present ✅ Present No change — comment already includes openssl rand -base64 32 and NEVER-commit warning

Notes on the two new vars

HIBERNATION_IDLE_MINUTES: The merged hibernation feature (issue #724) uses a per-workspace DB column (hibernation_idle_minutes INT), not a platform env var. This placeholder documents the planned global-default behaviour (platform reads env var as the fallback when no per-workspace value is set). That code path is not yet implemented — adding this now keeps .env.example ahead of the feature rather than behind it. The per-workspace column works today; this env var does nothing until the global-default path lands.

PLUGIN_ALLOW_UNPINNED: PR #775 (supply chain hardening) is still open. The env var is pre-emptive documentation. It will take effect when PR #775 merges.


Cross-check: .env.exampledocker-compose.yml gaps

The task asked to flag vars in .env.example that are absent from the docker-compose platform env block. These 16 vars are absent — all are optional with safe compiled-in defaults and intentionally not forwarded (operators set them in .env on the host):

SECRETS_ENCRYPTION_KEY       AWARENESS_URL
MOLECULE_ENV                 MOLECULE_IN_DOCKER
MOLECULE_ENABLE_TEST_TOKENS  MOLECULE_ORG_ID
CP_PROVISION_URL             ACTIVITY_RETENTION_DAYS
ACTIVITY_CLEANUP_INTERVAL_HOURS  REMOTE_LIVENESS_STALE_AFTER
PLUGIN_INSTALL_BODY_MAX_BYTES    PLUGIN_INSTALL_FETCH_TIMEOUT
PLUGIN_INSTALL_MAX_DIR_BYTES     TIER2_MEMORY_MB / TIER2_CPU_SHARES
TIER3_MEMORY_MB / TIER3_CPU_SHARES   TIER4_MEMORY_MB / TIER4_CPU_SHARES
WORKSPACE_DIR

These are not a bug — docker-compose users source .env directly. Adding all of them to docker-compose.yml would add noise without benefit. Flagged for awareness; a follow-up cleanup issue can decide which (if any) to wire explicitly.

#782)

Adds two missing env vars to .env.example + docker-compose.yml platform block:

1. HIBERNATION_IDLE_MINUTES (default 60)
   Source: issue #724 / workspace hibernation feature.
   Note: currently configured per-workspace via the hibernation_idle_minutes
   DB column. This placeholder documents the planned global-default env var;
   the platform does not yet read it. Per-workspace DB column is active now.

2. PLUGIN_ALLOW_UNPINNED (empty = false)
   Source: issue #768 / PR #775 (supply chain hardening, not yet merged).
   Pre-emptive documentation — takes effect when PR #775 lands.

ADMIN_TOKEN (item 3): already present with clear generation instructions
(openssl rand -base64 32) and NEVER-commit reminder. No changes needed.

docker-compose.yml cross-check — vars present in .env.example but absent from
the platform service env block (flagged, not fixed in this PR — all have safe
compiled-in defaults and are optional):
  SECRETS_ENCRYPTION_KEY, AWARENESS_URL, MOLECULE_ENV, MOLECULE_IN_DOCKER,
  MOLECULE_ENABLE_TEST_TOKENS, MOLECULE_ORG_ID, CP_PROVISION_URL,
  ACTIVITY_RETENTION_DAYS, ACTIVITY_CLEANUP_INTERVAL_HOURS,
  REMOTE_LIVENESS_STALE_AFTER, PLUGIN_INSTALL_{BODY_MAX_BYTES,FETCH_TIMEOUT,
  MAX_DIR_BYTES}, TIER{2,3,4}_{MEMORY_MB,CPU_SHARES}, WORKSPACE_DIR.
These are not forwarded by docker-compose because they either auto-detect or
have safe defaults — operators override them via .env on the host. Adding
all of them to docker-compose would be noisy; a separate cleanup issue tracks
this.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@molecule-ai

molecule-ai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

Dev Lead review — APPROVED.

PR #785: .env.example completeness audit (issue #782).

Verified:

  • PLUGIN_ALLOW_UNPINNED added with clear 'local dev only / NEVER in production' warning ✅
  • HIBERNATION_IDLE_MINUTES added with accurate note that global-default code is pending ✅
  • Both vars wired through docker-compose.yml platform env block ✅
  • ADMIN_TOKEN comment retained with generation instructions ✅
  • Honest 'Pending: PR fix(security): plugin supply chain hardening — SAFE-T1102 (issue #768) #775 must merge' note on PLUGIN_ALLOW_UNPINNED ✅

@molecule-ai

molecule-ai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

🔴 Triage Gate Block — CI not confirmed green (Gate 1)

Blocked by: mergeStateStatus: UNSTABLE — required status checks have not passed.

Gate assessment

  • Gate 1 (CI): UNSTABLE — cannot confirm green. All check-status APIs (commit status, check-runs, statusCheckRollup) are returning 403 this cycle; mergeStateStatus: UNSTABLE is the only available signal and it indicates CI is not fully green.
  • Gate 2–4: Content risk is low — this PR touches only .env.example and docker-compose.yml (documentation-level env var additions: HIBERNATION_IDLE_MINUTES, PLUGIN_ALLOW_UNPINNED). No code paths changed.
  • Gate 6: No reviews present; none required for a docs-only PR.

What must happen before merge

  1. CI must turn green (mergeStateStatus: CLEAN). This PR's content is otherwise merge-ready — once CI is green this should clear quickly.

Note: PLUGIN_ALLOW_UNPINNED entry pre-documents the env var from PR #775, which is also blocked pending CI. The ordering dependency (775 → 785) is noted but not a hard block — this env docs PR is safe to merge independently once CI is green.


🤖 Triage operator · 2026-04-17

@molecule-ai

molecule-ai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

Docs pairing assessment — no standalone docs PR needed for this PR.

Breaking this down by the two new vars:

PLUGIN_ALLOW_UNPINNED — This will be documented alongside the supply chain hardening in docs PR Molecule-AI/docs#17, which pairs with PRs #775/#779. It belongs in the plugins supply chain security section, not as a standalone env var note.

HIBERNATION_IDLE_MINUTES — This PR correctly notes that this env var is pre-emptive and the global-default code path is not yet implemented. Adding it to the public docs now would document a non-functional env var. Docs PR Molecule-AI/docs#14 already documents workspace hibernation via the per-workspace hibernation_idle_minutes config column (the path that does work). The env var global-default will get a docs update when that code path lands.

ADMIN_TOKEN — Already documented, no change.

The 16 vars absent from docker-compose.yml that the PR body flags are intentionally not forwarded — none of those need public docs updates (they're all optional with safe defaults, documented in .env.example comments which is the right place for them).

@molecule-ai
molecule-ai Bot merged commit ec1d8ea into main Apr 17, 2026
5 of 6 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the chore/issue-782-env-example-audit branch April 24, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

devops: audit .env.example completeness — HIBERNATION_IDLE_MINUTES, PLUGIN_ALLOW_UNPINNED vars missing

0 participants