Skip to content

fix(cognition): ground observed repository without allocation metadata - #5111

Closed
joelteply wants to merge 1 commit into
canaryfrom
2be63714/observed-repository
Closed

joelteply wants to merge 1 commit into
canaryfrom
2be63714/observed-repository

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

When a checkout has no allocation receipt, workspace grounding currently reports its branch and HEAD but omits its repository identity. In the observed Kimi request, the only explicit repository name instead came from an unrelated room ledger, preceding a command aimed at that repository.

Read the observed origin through the existing Git owner and render its sanitized repository key independently of allocation intent. Preserve allocation-unavailable reporting and all room history. Consolidate URL parsing in the existing board-key parser so userinfo, query/fragment, ports, and local paths cannot become a displayed remote URL.

Validation: existing parser cases now cover credential-bearing HTTPS, SSH ports, SCP and local/unrecognized remotes. The existing real Git workspace fixture covers absent allocation, changing origin, local/no origin and no secret in the rendered evidence. Source parsing and diff checks passed; hosted tests pending. This repairs a demonstrated grounding omission, not proven behavioral causality or coding recovery.

Card: 2be63714-9dea-4ffb-8dd4-2cae90d10daa. Post-deploy acceptance: Codex recovery will verify the actual canonical workspace block identifies the current repository without credentials; task edit and validation remain separate outcomes.

@joelteply
joelteply marked this pull request as ready for review October 16, 2026 15:20
@joelteply
joelteply marked this pull request as draft October 16, 2026 15:23
@joelteply
joelteply marked this pull request as ready for review October 16, 2026 15:23
@joelteply

Copy link
Copy Markdown
Contributor Author

Review of #5111 at a0f1c0b by Cormac (IntelMac), 2026-10-19. PASSED. Read only; CI green at this head.

Claims checked, at the diff:

  1. No credential reaches the model. repo_slug_from_remote_url keeps only the URL's path (reqwest::Url separates userinfo, port, query and fragment). An SCP path holding ? # @ : or a backslash is refused rather than displayed. RepositoryEvidence stores only the sanitized RepoId, never the URL, and the real-git fixture asserts nothing containing 'secret' is rendered.
  2. The observed origin is grounded independently of allocation intent: 'Observed origin repository: acme/actual' alongside 'Allocation evidence is unavailable', and it follows a changed origin.
  3. Local and unrecognized remotes give None, not a fabricated key (/tmp/..., ../..., C:/..., file://), so the caller is asked for repo.

Behaviour change worth knowing: a clone whose origin is a LOCAL path no longer yields a board key. The full lib suite passes, so nothing in-tree relied on it; mirrors and card clones carry the real remote as origin.

@joelteply

Copy link
Copy Markdown
Contributor Author

Closed in the queue sweep (Fable, 2026-10-24): superseded: the hardened Url::parse is at continuum-hands/src/code/git_bridge.rs:139, origin_repo handled in continuum-mind layout_reader.rs:85,196. Reopen if this is wrong.

@joelteply joelteply closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant