Skip to content

feat(datapack): sort transfer links and transfer rules in ascending duration order (#783) - #799

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/early-pruning-transfer-links-sort
Sep 23, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/early-pruning-transfer-links-sort

Conversation

@AquilaXk

Copy link
Copy Markdown
Owner

Related issue

Related #783

Summary

  • Problem: RAPTOR transfer relaxation in 2026 early pruning relies on walking duration monotonicity across footpaths. Transfer links and rules were previously serialized in arbitrary input order.
  • Outcome: `outOfStationTransferLinks` and `transferRules` are serialized into SQLite in ascending duration order (`durationSeconds` / `minTransferSeconds`), with deterministic tie-breaking via `codepointCompare`.

Changes

  • `tools/datapack/build-datapack.mjs`: Sort `outOfStationTransferLinks` by `durationSeconds` ascending and `transferRules` by `minTransferSeconds` ascending before SQLite batch insertion.
  • `tools/datapack/build-out-of-station-transfer-asymmetry.test.mjs`: Added deterministic unit test verifying duration-ascending serialization.

Scope

Included

  • Duration-ascending sort for `outOfStationTransferLinks` and `transferRules` during SQLite packaging.

Excluded

  • Schema changes or catalog version bump.

Verification

Check Result / Evidence
Focused test `node --test tools/datapack/build-out-of-station-transfer-asymmetry.test.mjs` (5/5 pass)
Required CI `npm test` (198/198 pass), `npm run check:fragment` (Preflight Gate PASSED)
Live / release operation Not required — reason: data build logic enhancement

Not run

  • Check: None
  • Reason: N/A
  • Rerun owner / condition: N/A

Risk

  • Level: Low
  • Main risk: None, order-preserving sort with fallback to ID.
  • Data / artifact / provenance impact: None
  • Failure behavior: Standard Node.js error handling

Rollback / Recovery

  • Rollback or recovery: Revert commit
  • Existing artifact / schema compatibility: Compatible

Checklist

  • 이슈 범위와 실제 diff가 일치합니다.
  • 관련 없는 변경을 포함하지 않았습니다.
  • 필요한 검증 결과와 미실행 사유를 기록했습니다.
  • 실패를 이전·stale·alternate 결과의 성공으로 바꾸는 경로를 추가하지 않았습니다.
  • GitHub PR Review 객체가 있는지 확인했습니다. CodeRabbit status check만으로는 리뷰 완료로 보지 않습니다.

@AquilaXk AquilaXk added the automerge FIFO 병합 큐 대상 — 코디네이터가 순서대로 update-branch 후 auto-merge label Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: efcb10c4-56ae-4110-bb0b-ecfa86077cd2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@AquilaXk AquilaXk left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🤖 Prompt for all review comments with AI agents
Could we verify each finding against the current code and keep only those that
still apply? Could we make the smallest validated fix and briefly note why any
finding no longer applies?

Inline comments:
None.

---

Outside diff comments:
None.
🪄 Autofix (Beta)

Codex fallback does not include CodeRabbit Autofix.

Could we verify each finding against the current code, then apply any still-valid
fix through the separately authorized workflow?


ℹ️ Review info
⚙️ Run configuration

Configuration used: Codex CLI invocation and local review instructions

Review profile: ASSERTIVE

Plan: Codex fallback

Run ID: N/A (Codex fallback)

Review source: Codex CLI

Repository visibility: public GitHub repository

Trigger:
Codex fallback triggered due to missing automated review

Base:
main@a1c84844d8548dafef0c8f4978614ff98fab3d66

Head:
feat/early-pruning-transfer-links-sort@41d1458d8e5ae0dbd58b11af0147a16bc01395e9

Command:
node /Users/aquila/.gemini/config/skills/easysubway-review/scripts/compile-review-payload.mjs

📥 Commits

Reviewing files changed in this pull request between:

  • Base: a1c84844d8548dafef0c8f4978614ff98fab3d66
  • Head: 41d1458d8e5ae0dbd58b11af0147a16bc01395e9
📒 Files selected for processing (2)
  • tools/datapack/build-datapack.mjs
  • tools/datapack/build-out-of-station-transfer-asymmetry.test.mjs
📜 Review details

@github-actions
github-actions Bot merged commit 5734bef into main Sep 23, 2026
14 checks passed
@AquilaXk
AquilaXk deleted the feat/early-pruning-transfer-links-sort branch September 25, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge FIFO 병합 큐 대상 — 코디네이터가 순서대로 update-branch 후 auto-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant