Skip to content

Commit ac2e9ae

Browse files
committed
refactor code for clarity
1 parent dcacccf commit ac2e9ae

2 files changed

Lines changed: 166 additions & 121 deletions

File tree

aws/lambda/pytorch-auto-revert/SIGNAL_EXTRACTION.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,10 @@ Notes
146146

147147
### Indexing & Data Structures
148148

149-
- `JobRow`: a single workflow_job row with fields we need (head_sha, workflow_name, wf_run_id, job_id, run_attempt, name, status, conclusion, started_at, created_at, rule).
150-
- `JobBaseNameKey`: groups jobs by `(workflow, normalized job base name)`.
151-
- `Commit`: top-level element with `sha: str` and `jobs: Dict[JobBaseNameKey, List[JobRow]]`.
152-
- For each commit, the `List[JobRow]` under every key is ordered by `started_at` (None last).
153-
- The extractor returns `List[Commit]` ordered newest→older by push timestamp.
149+
- Strongly-typed ids for clarity (type-checker only), like:
150+
- `WfRunId = NewType('WfRunId', int)`
151+
- `RunAttempt = NewType('RunAttempt', int)`
152+
These are used in the code for readability and to reduce keying mistakes.
154153

155154
## Implementation Plan
156155

0 commit comments

Comments
 (0)