Skip to content

Jobs keep the machine they were worked with: the vehicle's hitch points and the chain of tools - #834

Merged
chriskinal merged 1 commit into
developfrom
feat/job-rig
Nov 14, 2026
Merged

chriskinal merged 1 commit into
developfrom
feat/job-rig

Conversation

@chriskinal

Copy link
Copy Markdown
Collaborator

Part of #547, after #831 and #832. A job keeps the machine it was worked with: the vehicle's hitch points and the chain of tools on them.

Changes

  • JobRig (Models/Job), stored in job.json as rig:

    • vehicle: profile name, type, coupling type (DDI 157), and its drawbar, rear 3-point and front 3-point hitch points from the rear axle.
    • tools: in order from the vehicle. Each tool names its connector: one of the vehicle's hitch points, or PreviousTool (the rear connector of the tool before it). It also has its mount, its distances from that connector, and its offset, length, width and section widths.

    As ISO 11783-10 chains a tractor's connectors and each implement's elements, every part is measured from what it hangs on. It is a copy, not a profile name: a profile can be edited or deleted later.

  • When it is written: MainViewModel hands the job service the loaded vehicle and tool when a job starts or resumes, and whenever a profile is loaded or saved. Closing a settings panel saves it. JobService.RecordRig writes job.json only when the machine changed, and never writes a newer build's job.

  • One tool in practice: the web client works with one tool, so AgOpenWeb writes a chain of one. The format takes more, and the spec says a reader should accept more.

    • A reopened job gets the machine loaded at that moment, so a longer chain from another program is replaced by the tool that paints from then on.
    • No geometry for a chain of tools yet.
  • Format: rig is a new member, so schemaVersion stays 1. Since Field, job and coverage files: a format version, and what this build doesn't read is kept #825 an older build keeps members it doesn't know. A job saved before this change has no rig and gets none until it is opened.

  • Spec: Docs/FIELD_FILE_FORMATS.md describes rig.

Tests

  • JobRigTests (9):
    • the copy for each tool type, with only the distances that type uses;
    • a two-tool chain read back as written, with the member names and enum strings other programs read;
    • an older job;
    • writing only on a change;
    • no active job;
    • a newer build's job left alone.
  • JobRigRecordingTests (3): the view model records the machine on job start and on profile load and save. Two of them fail on develop's MainViewModel; the third, nothing recorded without a job, passes either way.
  • Models 472, Services 2451 (2 skipped), ViewModels 642, RemoteServer 44, all passing. The licence check passes.

Runner (this branch vs develop)

Harness Result
Update scenarios: old releases' jobs read back, rollback 0 new, 0 gone; both passed
Field jobs J1, J7 (3 turns) 0 new, 0 gone

🤖 Generated with Claude Code

…ts and the chain of tools

job.json gains rig: the vehicle's connectors and the tools in order from it, each measured from
the connector it hangs on (ISO 11783-10), a copy of the loaded profiles taken when the job starts
or resumes and whenever a profile is loaded or saved, written only when it changed. The web
client keeps one tool, so AgOpenWeb writes a chain of one; the format takes more. A new member,
so schemaVersion stays 1 (#547).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chriskinal
chriskinal requested a review from a team as a code owner November 14, 2026 01:23
@chriskinal
chriskinal requested review from Xyntexx and removed request for a team November 14, 2026 01:23
@chriskinal
chriskinal merged commit dac3bfd into develop Nov 14, 2026
7 checks passed
@chriskinal
chriskinal deleted the feat/job-rig branch November 14, 2026 01:39
renatorgr pushed a commit to renatorgr/AgOpenWeb that referenced this pull request Nov 14, 2026
…cial#834) into sync-pulverizador

Conflicts:
- Fork PRs that went upstream (AgOpenGPS-Official#818 long-curve draw cost, AgOpenGPS-Official#819 headland
  distance, AgOpenGPS-Official#821 closed-pass seam, AgOpenGPS-Official#827 lateral-move log, AgOpenGPS-Official#828 U-turn setback
  at the pass end): official wording and tests, fork extras kept (the
  lateral-move toast and hard-fence refusal, gapResumeIndex, the slide bound,
  boundary ring selection, the line-entry path, guidelines that enter the field).
- SceneProjector config stamp: the fork's RtkHold with official's hitch lengths.
- en.json: both. CLAUDE.md: fork bullets.

Official AgOpenGPS-Official#831 (hitch model) removed Tool.HitchLength: the fork's front implement
round a bend, the S onto a line beside a hard fence and the way to the start of
the pass now read RigGeometry.AttachX (the vehicle's hitch plus the tool's working
point from it), and the fork's tests set the vehicle's hitch as official's do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKEBDGFo85z1i7tUm4kacp
renatorgr added a commit to renatorgr/AgOpenWeb that referenced this pull request Nov 14, 2026
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