Skip to content

refactor(todo2code): split workspace comparison into focused modules - #112

Merged
ifuri-validator-agent[bot] merged 2 commits into
mainfrom
ticket-093-workspace-split
Sep 1, 2026
Merged

refactor(todo2code): split workspace comparison into focused modules#112
ifuri-validator-agent[bot] merged 2 commits into
mainfrom
ticket-093-workspace-split

Conversation

@tom-sapletta-com

Copy link
Copy Markdown
Contributor

Summary

  • Split workspace.ts (~508L) into workspace-deadline.ts, workspace-helpers.ts, workspace-trend.ts, workspace-types.ts
  • workspace.ts remains the stable public facade (~194L)
  • Closes ticket-093 / STARTER-066; marks ticket-088 DONE after linker merge

Test plan

  • npm run verify (433 pass, 1 skip)
  • ./project/governance-check.sh --actor agent

Ticket: ticket-093
Correlation ID: todo2code-pr-ticket-093

Made with Cursor

ifuri-validator-agent[bot]
ifuri-validator-agent Bot previously approved these changes Sep 1, 2026

@ifuri-validator-agent ifuri-validator-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deterministic Validator approval for exact head 1ba600e8c4b08059a0190050b5eb825c6f217a5e.

Ticket: ticket-093
Correlation ID: todo2code-pr-112-ticket-093
Model: zai/glm-5.3
Reviewed diff chunks: 4
Advisory LLM verdict: APPROVE
Advisory summary: Reviewed all 4 diff chunk(s). Chunk 1 of 4 covers governance scaffold for ticket-093 and the start of the workspace.ts module split (workspace-deadline.ts, workspace-helpers.ts). Deadline policy logic is a pure refactor with bounded scaling, path traversal checks use assertPathWithinRoot, and optional-file stat errors are swallowed only for genuinely optional inputs. All reported checks pass. | Refactoring chunk splitting workspace.ts into focused modules (workspace-trend.ts, workspace-types.ts, workspace-helpers.ts). Code is a straightforward module extraction with sound logic: path-traversal-safe existingFile() check, sensible trend classification, documentation-comparability handling. No behavior changes apparent in visible chunk. | Chunk 3 shows the tail of a mechanical refactor splitting workspace.ts into focused modules (deadline, helpers, trend, types) while keeping workspace.ts as a re-export facade preserving public API. The renamed local diagnosticsDeltaCounts avoids shadowing and is wired into both renderTrendMarkdown and the trend object. No logic changes beyond the split are visible; removed helpers and types are relocated per changed file list. | Chunk 4 of a refactoring PR splitting workspace.ts into focused modules. This chunk consists entirely of code removed from workspace.ts (trend rendering, git helpers, artifact path helpers) that is being relocated to the new modules covered by other chunks. No behavioral changes visible.
Advisory findings: none
The LLM output above is advisory and was not used as the approval trust root.
Merge will be attempted after this approval when explicitly authorized.

Decision record (recomputable)

DECISION D-093-4117
TICKET ticket-093
HEAD_SHA 1ba600e8c4b08059a0190050b5eb825c6f217a5e
CORRELATION_ID todo2code-pr-112-ticket-093
ACTOR agent:ifuri-validator-agent[bot]
APPLIED_RULE P-CORE-015
INPUT author_login = "tom-sapletta-com"
INPUT observed_checks = ["governance=SKIPPING","Live OpenRouter contract (opt-in)=SKIPPING","Java adapter (JDK 17 required)=PASS","verify=PASS","koru / code-review=PASS","Java adapter (JDK 17 required)=PASS","verify=PASS"]
INPUT required_checks = ["verify","Java adapter (JDK 17 required)","koru / code-review"]
INPUT required_checks_source = "protected registry + GitHub applied rules (env/request)"
INPUT reviewer_login = "ifuri-validator-agent[bot]"
INPUT superseded_checks = []
VERDICT APPROVE AUTHORITY DETERMINISTIC
REJECTED REQUEST_CHANGES BECAUSE NO_UNSAFE_CHANGE_REASON_FOUND
ADVISORY llm_verdict = "APPROVE" MODEL "zai/glm-5.3"
ASSERT VERDICT_AUTHORITY != "ADVISORY"

tom-sapletta-com and others added 2 commits September 1, 2026 14:41
Record STARTER-066 scope and allowedPaths before implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract deadline policy, types, trend reporting, and git/pipeline helpers
from workspace.ts. Close ticket-088 after linker merge.

Co-authored-by: Cursor <cursoragent@cursor.com>

@ifuri-validator-agent ifuri-validator-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deterministic Validator approval for exact head 915786092a496a9a9fc25c62baa1c56da7328ffa.

Ticket: ticket-093
Correlation ID: todo2code-pr-112-ticket-093
Model: zai/glm-5.3
Reviewed diff chunks: 4
Advisory LLM verdict: APPROVE
Advisory summary: Reviewed all 4 diff chunk(s). Chunk 1 of 4: governance scaffold for ticket-093 and initial split of workspace comparison into workspace-deadline.ts and workspace-helpers.ts. Deadline policy math, input sizing, and output-directory scoping look correct; scopedOutputDirectory now honors allowOutsideRoot consistent with other call sites. All visible CI checks pass. No blocking or security findings in this chunk. | Chunk 2 of a mechanical refactor splitting workspace.ts into workspace-helpers.ts, workspace-trend.ts, and workspace-types.ts. Extracted helpers preserve prior semantics (defaulted options, path containment checks via relative/'..' guard, trend classification, artifact path rendering). Documentation coverage comparability guard is well-reasoned and documented. No security issues; no failed checks in test data. | Chunk 3 shows a mechanical refactor splitting the large workspace.ts module into deadline/helpers/trend/types modules with workspace.ts as a re-exporting facade. The diff is mostly code moved out; remaining in-file changes are a rename of diagnosticsDelta to diagnosticsDeltaCounts to avoid shadowing. Behavior appears preserved. | This chunk shows the removal of helper functions from workspace.ts as part of a refactoring that splits the module into workspace-deadline.ts, workspace-helpers.ts, workspace-trend.ts, and workspace-types.ts. The removed code (trend direction computation, artifact path mapping, markdown rendering, git exec helper) is relocated rather than deleted, consistent with the PR description. Tests all pass.
Advisory findings: none
The LLM output above is advisory and was not used as the approval trust root.
Merge will be attempted after this approval when explicitly authorized.

Decision record (recomputable)

DECISION D-093-0630
TICKET ticket-093
HEAD_SHA 915786092a496a9a9fc25c62baa1c56da7328ffa
CORRELATION_ID todo2code-pr-112-ticket-093
ACTOR agent:ifuri-validator-agent[bot]
APPLIED_RULE P-CORE-015
INPUT author_login = "tom-sapletta-com"
INPUT observed_checks = ["Live OpenRouter contract (opt-in)=SKIPPING","governance=SKIPPING","Java adapter (JDK 17 required)=PASS","verify=PASS","verify=PASS","Java adapter (JDK 17 required)=PASS","koru / code-review=PASS","Java adapter (JDK 17 required)=PASS","verify=PASS"]
INPUT required_checks = ["verify","Java adapter (JDK 17 required)","koru / code-review"]
INPUT required_checks_source = "protected registry + GitHub applied rules (env/request)"
INPUT reviewer_login = "ifuri-validator-agent[bot]"
INPUT superseded_checks = []
VERDICT APPROVE AUTHORITY DETERMINISTIC
REJECTED REQUEST_CHANGES BECAUSE NO_UNSAFE_CHANGE_REASON_FOUND
ADVISORY llm_verdict = "APPROVE" MODEL "zai/glm-5.3"
ASSERT VERDICT_AUTHORITY != "ADVISORY"

@ifuri-validator-agent
ifuri-validator-agent Bot merged commit f7034e3 into main Sep 1, 2026
17 checks passed
@ifuri-validator-agent
ifuri-validator-agent Bot deleted the ticket-093-workspace-split branch September 1, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant