Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

fix(evidence): normalize origins before credential redaction

Rudy Celeklif2b80bd8399c
diff --git a/archify.zip b/archify.zip
index d97f9079..cab46033 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/renderers/shared/repository-evidence.mjs b/archify/renderers/shared/repository-evidence.mjs
index a4496e93..d2efb6ee 100644
--- a/archify/renderers/shared/repository-evidence.mjs
+++ b/archify/renderers/shared/repository-evidence.mjs
@@ -229,7 +229,7 @@ export function verifyRepositoryEvidence(diagramType, diagram, repoRootInput) {
supportedFixes: [`pass --repo-root ${gitRoot}`],
});
}
- const origin = gitValue(realRoot, ['remote', 'get-url', 'origin'], 'Evidence repository must have an origin remote.');
+ const origin = gitValue(realRoot, ['remote', 'get-url', 'origin'], 'Evidence repository must have an origin remote.').trim();
if (parseRepositoryRemote(origin, { provider: repository.provider })?.identity !== location.identity) {
const safeOrigin = redactRepositoryRemote(origin);
evidenceFailure('repository-evidence/origin-mismatch', `Evidence repository origin ${JSON.stringify(safeOrigin)} does not match ${JSON.stringify(repository.url)}.`, {
diff --git a/test/repository-evidence.test.mjs b/test/repository-evidence.test.mjs
index 2f0cfe2e..9761dab2 100644
--- a/test/repository-evidence.test.mjs
+++ b/test/repository-evidence.test.mjs
@@ -417,6 +417,10 @@ test('portable origin failures redact HTTP credentials and query tokens', () =>
'http://user:[email protected]/Team/other',
'http://git.internal/Team/repo?token=SYNTHETIC_TOKEN',
'https://user:[email protected]/Team/repo',
+ ' http://user:[email protected]/Team/other',
+ '\thttp://user:[email protected]/Team/other',
+ ' https://user:[email protected]/Team/other',
+ '\thttps://user:[email protected]/Team/other',
]) {
git(data.root, 'remote', 'set-url', 'origin', origin);
const result = run(['validate', 'architecture', data.input, '--repo-root', data.root, '--json']);