Files
hermes-agent/scripts/install_root_lint_baseline.json
alt-glitch 360f48814c refactor: callers find the install folder through project_root_str()
61 call sites counted directories up from their own __file__ to find the
install folder. They now call hermes_cli._startup_fast.project_root_str(),
so the layout move changes one line instead of 61.

Kept with a reason in the lint baseline: files that cannot import Hermes
code (bootstrap, update path, pm/) and the sys.path bootstraps left for
part 2b. The baseline drops from 89 to 28 root_from_file sites.

Six existing tests that patched a module __file__ now patch the owner.
2026-11-13 18:45:31 +00:00

67 lines
3.4 KiB
JSON

{
"root_from_file": {
"cron/scheduler.py": 1,
"gateway/platforms/base.py": 1,
"hermes_bootstrap.py": 2,
"hermes_cli/__init__.py": 1,
"hermes_cli/_early_recovery.py": 2,
"hermes_cli/_launchers.py": 3,
"hermes_cli/_old_updater.py": 1,
"hermes_cli/_startup_fast.py": 1,
"hermes_cli/linux_desktop_entry.py": 1,
"hermes_cli/main.py": 1,
"hermes_cli/source_completion.py": 1,
"hermes_cli/update_handoff.py": 1,
"hermes_cli/update_host_obligation.py": 1,
"hermes_cli/update_lock.py": 1,
"hermes_cli/update_pause_record.py": 1,
"hermes_cli/venv_sync.py": 1,
"hermes_constants.py": 2,
"pm/environments.py": 1,
"pm/launch.py": 1,
"pm/paths.py": 1,
"pm/worker.py": 1,
"tools/bot_mode_dm.py": 1,
"tools/environments/local.py": 1
},
"module_sys_path": {
"cron/scheduler.py": 1,
"gateway/platforms/base.py": 1,
"hermes_cli/cron.py": 1,
"hermes_cli/main.py": 1,
"hermes_cli/web_server.py": 1,
"plugins/platforms/raft/adapter.py": 1,
"plugins/platforms/slack/adapter.py": 1,
"pm/launch.py": 1
},
"reasons": {
"cron/scheduler.py": "sys.path bootstrap before the first Hermes import (group C, part 2b)",
"gateway/platforms/base.py": "sys.path bootstrap before the first Hermes import (group C, part 2b)",
"hermes_bootstrap.py": "runs before any Hermes package imports",
"hermes_cli/__init__.py": "package init; cannot import its own submodule while an old updater swaps the tree",
"hermes_cli/_early_recovery.py": "loaded as a single file during recovery, no package imports",
"hermes_cli/_launchers.py": "launcher templates run before Hermes imports and across the update swap",
"hermes_cli/_old_updater.py": "frozen old-updater surface, runs against an old or half-swapped tree",
"hermes_cli/_startup_fast.py": "the owner",
"hermes_cli/cron.py": "module-level sys.path edit left for part 2b",
"hermes_cli/linux_desktop_entry.py": "keeps the unresolved path so shim text matches the installer on symlinked homes",
"hermes_cli/main.py": "bootstrap that puts the root on sys.path before the first import",
"hermes_cli/source_completion.py": "run as a script across the update swap",
"hermes_cli/update_handoff.py": "run by the old updater across the code swap",
"hermes_cli/update_host_obligation.py": "run by the old updater across the code swap",
"hermes_cli/update_lock.py": "loaded by path across the update swap",
"hermes_cli/update_pause_record.py": "loaded by path across the update swap",
"hermes_cli/venv_sync.py": "loaded by path across the update swap",
"hermes_cli/web_server.py": "module-level sys.path edit left for part 2b",
"hermes_constants.py": "runs before any Hermes package imports",
"plugins/platforms/raft/adapter.py": "module-level sys.path edit left for part 2b",
"plugins/platforms/slack/adapter.py": "module-level sys.path edit left for part 2b",
"pm/environments.py": "pm must not import hermes_cli",
"pm/launch.py": "pm must not import hermes_cli",
"pm/paths.py": "pm must not import hermes_cli; the Docker tool stage ships without it",
"pm/worker.py": "pm must not import hermes_cli",
"tools/bot_mode_dm.py": "__main__ block run by path: needs the root on sys.path before it can import Hermes",
"tools/environments/local.py": "keeps the unresolved spelling for Windows path aliases"
}
}