refactor: remove dead code and redundant patterns#56
Merged
Conversation
Cleanup based on multi-perspective workflow findings: Dead code removal: - Removed Parse(), ParseFile(), BuildSandboxEnv() from internal/profile - Simplified StageHarnessDir to only create directory - Updated tests to match streamlined profile package - Updated TODO.md to track remaining consolidation work Code deduplication: - Extract resolveSandboxImage() helper (used in create, up, launch) - Replace providerInList() with slices.Contains from stdlib - Removed corresponding test for deleted helper Documentation: - Archived docs/design.md (outdated naming, superseded by README/SPEC) - Added docs/archive/README.md explaining archived content - Updated plans/nemoclaw-arch.md gap analysis (lifecycle commands now implemented) Build artifacts: - Add build/runner/openshell and harness-openshell to .gitignore Net: -152 lines (217 deleted, 65 added)
Fixes identified by multi-perspective fact-checking workflow (213 agents, 78/208 claims inaccurate): AGENTS.md: - Line 73: Fix "custom gateway image" → "custom sandbox image" (confuses sandbox vs gateway) - Line 82: Fix oauth2_refresh_token → oauth2-refresh-token (matches implementation) - Line 99: Remove non-existent --full flag from --ci equivalence README.md: - Line 74: Fix entrypoint example (remove --bare flag, matches actual demo.yaml) Remaining issues tracked in /tmp/fact-audit-report.md: - 6 critical (openshell-arch/ already gitignored) - 47 high-severity (config examples, test comments) - 23 medium-severity (minor outdated claims)
Additional fixes from fact audit: README.md: - Line 12: Add missing 'brew tap nvidia/openshell' prerequisite - Line 46, 124: Remove --bare flag from examples (not in actual configs) agents/providers/profiles/atlassian.yaml: - Line 5: Fix outdated reference to sandbox-ocp.sh (now uses agent.yaml config) cmd/providers.go: - Line 286: Fix path sandbox/profiles → agents/providers/profiles sandbox/policy.yaml: - Line 87: Update GWS comment (now uses native provider, not uploaded files) All high/critical severity issues now resolved. Remaining medium/low issues are accurate or minor inconsistencies not worth changing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleanup based on multi-perspective workflow findings that scanned the codebase from 5 different angles (dead code, finished TODOs, redundant docs/code/plans) with adversarial verification.
Net result: -152 lines (217 deleted, 65 added)
Changes
Dead Code Removal
Parse(),ParseFile(),BuildSandboxEnv()frominternal/profileStageHarnessDir()to only create directory (payload rendering moved to agent package)build/runner/openshellandharness-openshellto.gitignoreCode Deduplication
resolveSandboxImage()helpercreate.go,up.go,launch.goSANDBOX_IMAGEenv > agent config > defaultproviderInList()withslices.Containsfrom stdlib (Go 1.21+)Documentation Cleanup
docs/design.md→docs/archive/design-v1-2026-06-08.mdharness.tomlvsopenshell.toml,profiles/*.tomlvsagents/*.yaml)docs/archive/README.mdexplaining archived contentplans/nemoclaw-arch.mdgap analysisTODO.mdto reflect partial completion of profile consolidationDeleted Scratch Files
demo.md(superseded bydemo/directory)fix-startup.md,remainingbanners.md(debugging notes for completed PR fix: add claude wrapper to skip sandbox startup modals #53)dashboard.html,strategy-dashboard.html(planning artifacts)plans/ocp-sandbox.sh,plans/verify-integrations.py(unreferenced scripts)Testing
internal/profiletests passgo build .)Next Steps
Remaining work identified in
TODO.md:ValidateProvidersto agent or gateway packageConfigstruct into sandbox.goGenerated via multi-agent workflow: 56 agents, 51 findings → 28 confirmed after adversarial verification