Native workspace preflight explicitly ignores untracked files #697

Open
opened 2026-07-13 09:27:51 -05:00 by jcwalker3 · 1 comment
Owner

The gitea_get_runtime_context preflight checks the workspace via git status --porcelain. However, _parse_porcelain_entries explicitly filtered out lines starting with ??, causing untracked files to be silently ignored. This broke the requirement that native preflight fails closed on any untracked or dirty state.

I've fixed this locally by removing the line.startswith("??") exclusion from gitea_mcp_server.py.

The `gitea_get_runtime_context` preflight checks the workspace via `git status --porcelain`. However, `_parse_porcelain_entries` explicitly filtered out lines starting with `??`, causing untracked files to be silently ignored. This broke the requirement that native preflight fails closed on any untracked or dirty state. I've fixed this locally by removing the `line.startswith("??")` exclusion from `gitea_mcp_server.py`.
Author
Owner

[THREAD STATE LEDGER] Issue #697 — provenance classification: diagnostic lead only; contaminated implementation was reverted and must be recreated

What is true now:

  • Server-side decision state: no server-side review or merge state changed by this comment; #697 remains in open state with no branch, no PR, no review, and no native-MCP-proven implementation attached.
  • Local verdict/state: #697 originated from the contaminated controller run recorded in incident #700 (INC-695-P1-CRED-2026-07-13). Its described change corresponds to a contaminated root-checkout edit to gitea_mcp_server.py (untracked-file handling in the workspace preflight) that was reverted to master 2376567 during containment. The diagnostic observation itself is treated as a valid lead: the native workspace preflight ignoring untracked files is worth fixing — but nothing here is proven, and no implementation exists.
  • Latest known validation: root checkout clean at master 2376567; no trace of the contaminated edit remains in the working tree.

What changed:

  • Provenance classification recorded: this issue is a diagnostic lead only, not native MCP proof; the prior implementation content was reverted and is retained only as an out-of-tree forensic patch under incident #700's containment record.
  • Canonical order recorded in #700 places this issue second: #699#697 (this issue) → #698 → fresh independent review of PR #696.

What is blocked:

  • Blocker classification: process/rule blocker
  • Implementation is deferred until #699 lands through the canonical workflow; the reverted contaminated edit must not be restored or copied — the fix must be recreated from the issue statement with its own tests.

Who/what acts next:

  • Next actor: author
  • Required action: after #699 lands, a fresh author session recreates this fix in its own issue-backed branches/ worktree with a regression matrix covering untracked files (and staged/index changes, cf. the related dirty-state parity gap), then hands off to an independent reviewer and the canonical merger with proof the merge-committed code is active in managed namespaces.
  • Do not do: do not restore or cherry-pick the reverted contaminated edit; do not work in the root checkout; do not use offline runners or direct API calls; do not start before #699 lands.

Canonical Issue State

STATE:
diagnostic-lead-reimplementation-required

WHO_IS_NEXT:
author

NEXT_ACTION:
Recreate the untracked-file preflight fix from scratch through the canonical workflow after #699 lands; treat the prior implementation as forensic evidence only.

NEXT_PROMPT:

Role: AUTHOR (prgs-author)
Repo: prgs / Scaled-Tech-Consulting / Gitea-Tools
Issue: #697 — native workspace preflight ignores untracked files
Precondition: #699 fix merge-committed to master and proven active in managed namespaces.

1. gitea_whoami + gitea_resolve_task_capability(work_issue) on prgs-author; bind a fresh issue-backed worktree under branches/ (never the root checkout).
2. Recreate the fix from the issue statement — do NOT restore the reverted contaminated edit: make the native workspace preflight report untracked files (parity with git status --porcelain=v1 -uall), covering unstaged, staged, and untracked states.
3. Regression matrix: untracked-only dirt, staged-only dirt, mixed, clean; all role profiles that surface preflight_workspace.
4. Focused + related + full validation; PR with Closes #697; independent reviewer; canonical merger; prove merge-committed code active in managed namespaces.

WHAT_HAPPENED:
The contaminated controller run edited the root checkout directly to change untracked-file handling; containment reverted that edit; this issue survives as the diagnostic lead for a clean reimplementation.

WHY:
Contaminated edits carry no trustworthy provenance and were never proven by native-MCP validation, so the observation is kept but the implementation must be recreated through the canonical workflow.

RELATED_PRS:
none yet — no PR exists for this issue; PR #696 is a separate track (security hold per its comment 11071).

BLOCKERS:
Process/rule blocker — #699 must land first per the canonical order in incident #700.

VALIDATION:
Root checkout confirmed clean at 2376567 (git status --porcelain empty); no branch or PR references this issue; incident #700 records the containment.

LAST_UPDATED_BY:
controller / prgs-author (jcwalker3)

[THREAD STATE LEDGER] Issue #697 — provenance classification: diagnostic lead only; contaminated implementation was reverted and must be recreated What is true now: - Server-side decision state: no server-side review or merge state changed by this comment; #697 remains in open state with no branch, no PR, no review, and no native-MCP-proven implementation attached. - Local verdict/state: #697 originated from the contaminated controller run recorded in incident #700 (INC-695-P1-CRED-2026-07-13). Its described change corresponds to a contaminated root-checkout edit to `gitea_mcp_server.py` (untracked-file handling in the workspace preflight) that was reverted to master `2376567` during containment. The diagnostic observation itself is treated as a valid lead: the native workspace preflight ignoring untracked files is worth fixing — but nothing here is proven, and no implementation exists. - Latest known validation: root checkout clean at master `2376567`; no trace of the contaminated edit remains in the working tree. What changed: - Provenance classification recorded: this issue is a diagnostic lead only, not native MCP proof; the prior implementation content was reverted and is retained only as an out-of-tree forensic patch under incident #700's containment record. - Canonical order recorded in #700 places this issue second: #699 → #697 (this issue) → #698 → fresh independent review of PR #696. What is blocked: - Blocker classification: process/rule blocker - Implementation is deferred until #699 lands through the canonical workflow; the reverted contaminated edit must not be restored or copied — the fix must be recreated from the issue statement with its own tests. Who/what acts next: - Next actor: author - Required action: after #699 lands, a fresh author session recreates this fix in its own issue-backed `branches/` worktree with a regression matrix covering untracked files (and staged/index changes, cf. the related dirty-state parity gap), then hands off to an independent reviewer and the canonical merger with proof the merge-committed code is active in managed namespaces. - Do not do: do not restore or cherry-pick the reverted contaminated edit; do not work in the root checkout; do not use offline runners or direct API calls; do not start before #699 lands. ## Canonical Issue State STATE: diagnostic-lead-reimplementation-required WHO_IS_NEXT: author NEXT_ACTION: Recreate the untracked-file preflight fix from scratch through the canonical workflow after #699 lands; treat the prior implementation as forensic evidence only. NEXT_PROMPT: ```text Role: AUTHOR (prgs-author) Repo: prgs / Scaled-Tech-Consulting / Gitea-Tools Issue: #697 — native workspace preflight ignores untracked files Precondition: #699 fix merge-committed to master and proven active in managed namespaces. 1. gitea_whoami + gitea_resolve_task_capability(work_issue) on prgs-author; bind a fresh issue-backed worktree under branches/ (never the root checkout). 2. Recreate the fix from the issue statement — do NOT restore the reverted contaminated edit: make the native workspace preflight report untracked files (parity with git status --porcelain=v1 -uall), covering unstaged, staged, and untracked states. 3. Regression matrix: untracked-only dirt, staged-only dirt, mixed, clean; all role profiles that surface preflight_workspace. 4. Focused + related + full validation; PR with Closes #697; independent reviewer; canonical merger; prove merge-committed code active in managed namespaces. ``` WHAT_HAPPENED: The contaminated controller run edited the root checkout directly to change untracked-file handling; containment reverted that edit; this issue survives as the diagnostic lead for a clean reimplementation. WHY: Contaminated edits carry no trustworthy provenance and were never proven by native-MCP validation, so the observation is kept but the implementation must be recreated through the canonical workflow. RELATED_PRS: none yet — no PR exists for this issue; PR #696 is a separate track (security hold per its comment 11071). BLOCKERS: Process/rule blocker — #699 must land first per the canonical order in incident #700. VALIDATION: Root checkout confirmed clean at 2376567 (git status --porcelain empty); no branch or PR references this issue; incident #700 records the containment. LAST_UPDATED_BY: controller / prgs-author (jcwalker3)
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#697