feat(cli): infer registry name from git remote.origin.url#981
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
git remote.origin.url
|
@claude Act as a senior reviewer for GitNexus. Your job is to determine whether this PR is production-ready for this repo, not to give a generic code review. You are reviewing a PR in the GitNexus monorepo:
Your task has 2 phases, in this exact order: PHASE 1 — DEFINE THE BAR PHASE 2 — REVIEW THE PR AGAINST THAT BAR CONTEXT TO LOAD FIRST
Additional context:
PRIMARY OBJECTIVE Do not optimize for completeness at the expense of signal. REVIEW RULES
For each finding, assign one severity:
REPO-SPECIFIC REVIEW CHECKLIST 1. Correctness & functional completenessCheck:
2. Code clarity & clean codeCheck:
3. Test coverage & change safetyEvaluate against TESTING.md:
4. PerformanceInspect for:
5. Operational riskCheck:
6. MaintainabilityCheck:
NON-NEGOTIABLES TO VERIFY
OUTPUT FORMAT Production-ready bar for this PRGive a concise repo-specific definition in 5–10 bullets. FindingsFor each finding, use this structure exactly: [BLOCKING|NON-BLOCKING|NIT] Short title
Only include findings that are real and supported.
What I could not fully verifyList any behavior you could not prove from the diff, tests, or available context. Final verdictChoose exactly one:
If verdict is not ready, list the blocking items in priority order. IMPORTANT REVIEW BEHAVIOR
|
|
Claude finished @magyargergo's task in 3m 47s —— View job PR Review:
|
|
@copilot please format the code as per CI job requirements |
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/a4bf631d-ea6b-4d84-b426-29b1e5c3539f Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
…patwari#981) * Initial plan * Plan: smarter index name inference via git remote URL Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> * feat(cli): infer registry name from git remote.origin.url (abhigyanpatwari#979) Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> * refactor: skip git subprocess when --name was supplied (review feedback) Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/95064d2d-b1da-4c89-9069-5b3e9cc2636a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> * style: prettier --write on run-analyze.ts Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/a4bf631d-ea6b-4d84-b426-29b1e5c3539f Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
gitnexus analyzederives the registry name frompath.basename(repoPath), which produces useless / colliding names for layouts where the leaf directory is generic — Gas-Town<rig>/refinery/rig/, monorepo subprojects (packages/api,packages/web), git worktrees, vendored mirrors. PR #955 added--nameand a collision guard (Fix A + C from the issue) but did nothing for the common case where the user runsanalyzewith no flags.This PR adds Fix B: when
--nameis not supplied, derive the name fromgit config --get remote.origin.urlbefore falling back to the basename.Changes
gitnexus/src/storage/git.ts— newgetRemoteOriginUrl,parseRepoNameFromUrl(handles HTTPS, SSHgit@host:,ssh://,git://,file://; strips.gitand trailing slashes), andgetInferredRepoNamewrapper. All defensive — returnnullon missing git /--skip-git/ noorigin.gitnexus/src/storage/repo-manager.ts—registerRepoprecedence is nowexplicit --name > preserved alias > remote-inferred > basename. Thegit configsubprocess is skipped when--nameis supplied; otherwise the inferred name is computed once and shared between the alias-preservation check and the fallback.hasCustomAliastakes the inferred name as a parameter to avoid re-deriving it.registerReponow returns the resolved name (wasvoid); existing callersawaitand discard, so non-breaking.gitnexus/src/core/run-analyze.ts—projectNameis now the value returned byregisterRepo, so AGENTS.md / skill / AI-context files reference the same name MCP clients will look up. Early-return path uses the same inference for consistency.Behaviour
Precedence chain in
registerRepo:Notes for reviewers
analyze, switch to the remote-derived name when those differ. This is the intended fix; the operator can pin the old value with--name <basename>.--name/--allow-duplicate-nameremain the escape hatches.hasCustomAliastreats a stored remote-inferred name as an inference (not a sticky alias), so re-analyses keep tracking remote renames.Tests
gitnexus/test/unit/repo-manager.test.ts— 14 new tests:parseRepoNameFromUrl: HTTPS, SSH (git@host:),ssh://,git://,file://, trailing slashes, mixed-case.GIT, empty / null / undefined.getInferredRepoNameagainst realgit initrepos: no.git, noorigin, withorigin.registerRepoprecedence with realgit init+remote add origin: Gas-Town<rig>/refinery/rig/repro, two distinctly-remotedrig/leaves no longer collide,--namewins, preserved alias wins, basename fallback when no remote.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
extension.ladybugdb.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit/repo-manager.test.ts /hom�� arget/node_modul-I --64(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit/repo-manager.test.ts -c stdout.buffer.wr--hash-style=gnu(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit/run-analyze.test.ts test/unit/index-repo-command.test.ts test/unit/repo-manager.test.ts(dns block)If you need me to access, download, or install something from one of these locations, you can either: