Skip to content

refactor(export): split the stale-text demotion into candidate rebuild and restated checks - #1342

Open
devin-ai-integration[bot] wants to merge 4 commits into
developfrom
fix/sonar-export
Open

devin-ai-integration[bot] wants to merge 4 commits into
developfrom
fix/sonar-export

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Clears go:S3776 on (*decoder).demoteStale in internal/translate/export/verbatim.go. Choosing the id form the document follows and re-encoding the candidate in it is now rebuildCandidate; deciding that a disagreeing triple only restates a disagreement that counts elsewhere (referent membership, library reference, implied relationship ends) is restatesAnotherDisagreement. demoteStale keeps the loop that blames the printed text. Pure refactor, no behaviour change, no changelog fragment.

A pull request gets no SonarCloud analysis (the CircleCI scan job runs on develop and main only); the proof that these findings clear is the post-merge scan of develop.

How it was verified

gofmt -l . empty, go build ./..., go vet ./..., make lint, go test ./internal/translate/export ./tests/export ./tests/hygiene pass locally (the pilot-corpora gated round trips skip without the corpora). The SonarCloud analyzer run over the file reports no finding.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/c2b1ac4ad6de4d8788e78fd86c7c1729
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/c2b1ac4ad6de4d8788e78fd86c7c1729?variant=devin
Requested by: @HuiJun

Baseline re-record

docs/project/api-json-differential-baseline.json pins a source digest of internal/translate/export, so this refactor moved it and tools/referee/apijson failed in CI. The baseline is re-recorded over the full pinned corpora (go run -C tools ./cmd/pilot-apijson-diff -update). Besides the digest and the date, three counters move (typeMismatch 1742→1743, extensionProperties 140676→140679, one root 390→391); the same run with develop's own verbatim.go moves exactly those three and leaves the digest alone, so they are develop's drift since the 2026-10-20 record and this refactor changes no verdict. #1333, #1331, #1328 and #1232 also re-record this file; whichever lands second re-records the digest line.

…d and restated checks

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 3 commits October 21, 2026 07:15
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…stated verbatim writer

The baseline pins a source digest of internal/translate/export, so splitting the
stale-text demotion moved it. Re-recorded over the full pinned corpora: the only
other movement (typeMismatch 1742→1743, extensionProperties 140676→140679) is
reproduced with develop's own verbatim.go, so it is develop's drift since the
2026-10-20 record, not a change of this refactor.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 21, 2026 12:09

This branch has not been deployed

No deployments
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