TREN

Sectors · Nuclear Construction

SECTOR ENGINE · S-17

Nuclear construction

The whole of the engine written for nuclear is a single function: a counter that scores the NQA-1 documentation set. One method, one route, a 42-line file. This page is about what that function counts, how it counts, and what its pass mark actually admits.

ONE METHOD · ONE ROUTE · 42 LINES

CAPABILITY
  • NQA-1 dossier completeness score
The route sits in the sector-engines group. The call requires CSRF validation and runs on a budget of 60 requests a minute; that budget belongs to this route itself, keyed by tenant and route template. The card has one row because the class has one method.
THE ENGINE

The class is small, and all of it is in one file

Every method is reachable through a route. That is a measurement: the class holds one method, and that method sits behind a route. There is one method, and it looks for five names in one field of the records you send.

Source
One class, one method, 42 lines. The smallest of the four sector engines.
Reach
1 method, 1 route. All of the class sits behind it.
Input
Quality records: a list of objects. A required field; the body has to carry it, otherwise the request comes back 422. An empty list is valid and scores 0. The one field read from each object is type; the score comes out of it alone.
Output
Five fields: the NQA-1 compliance score, the document names found, the document names still expected, the status, and a fixed risk table.

THE RISK TABLE IS FIXED · THE SAME IN EVERY RESPONSE, INDEPENDENT OF THE INPUT · THE 3.0 INSIDE IT IS A DECLARED COEFFICIENT

All 32 sectors →

WHAT IT COUNTS

Five document names, in source order

The engine looks for these five names. The list is a constant in the code and it is in English; we print it untranslated, because this is exactly the name the engine looks for. The same list is the denominator: the score is how many of the five were found.

  • QA Program
  • Inspection Plans
  • Work Instructions
  • Traveler Documents
  • Material Certifications

score = round(found_name_count / 5 * 100, 1)

THE LIST IS AN ENGLISH CONSTANT IN THE CODE · THE MINING ENGINE HAS TURKISH CONSTANTS IN THE SAME PLACE · BOTH ARE QUOTED AS THEY STAND IN THE SOURCE

THE PASS MARK

It says 95. In the arithmetic it means 100.

The status is set by a single line in the source: COMPLIANT if the score is 95 or above, NON_COMPLIANT below it. With a five-item list there is exactly one value that clears it.

Every value the score can take

Because the denominator is five, the score can only be 0, 20, 40, 60, 80 or 100. We ran all six and counted; the value one step above 80 is 100 itself.

So 95 means 100

Four of the five documents is 80, and it comes back non-compliant. The threshold is arithmetically the same as asking for all of them. The number reads as though it leaves some room; on a five-item list the step is 20 points, so 100 alone clears it.

status = COMPLIANT if score >= 95, otherwise NON_COMPLIANT

MEASURED: 0 · 20 · 40 · 60 · 80 · 100 · THE SET IS THESE SIX · 4/5 = 80 = NON_COMPLIANT

HOW IT MATCHES

It reads the label: the type field

All the engine reads is text. It lowercases both the type field of each record you send and the document name it is looking for, then searches for one inside the other. A substring search over one field — and blind to case.

found(required_doc) = does lower(required_doc) appear inside lower(type) of at least one record

RuleThe search has four consequences and all four were measured. One: only the type field is read, so putting the same name in a name field scores 0. Two: the search is a substring, so “Approved QA Program Rev 3” matches — and because the required name is the needle, a match wants the plural string “Material Certifications”, so a record written in the singular stays on the still-expected list. Three: five records of the same type score 20, while a single record naming two documents scores 40 — so what the score counts is the names found, whatever the number of documents you hold. Four: a score of 0 says zero of the five names were found; an empty list and records that fall outside the five both give the same number.

ALL FOUR BEHAVIOURS WERE VERIFIED BY RUNNING THEM · EACH ONE RESTS ON AN EXECUTED MEASUREMENT

QUESTIONS

What people ask about this engine

Are four of the five documents enough?

All five. Four scores 80 and the status comes back non-compliant. The threshold is written as 95, and on a five-item list the score steps by 20, so the one value that clears it is 100.

Does the engine read our documents?

The engine’s input is one field: the type field of the objects you send in the request body. The score comes out of that field alone; the file system and the database sit outside the job. So the score measures your labelling — and the “how it matches” section exists precisely to keep those two apart.

Can the score be wrong in our favour, or against us?

Both, and we measured both. In your favour: a single record whose type reads “QA Program and Inspection Plans” satisfies two names at once, so one record scores 40. Against you: drop the plural and write “Material Certification”, and since the match looks for the plural string, that document stays on the still-expected list.

What does the 3.0 multiplier in the response multiply?

A declared coefficient. It occurs in exactly one place in the tree, which is its own definition. It reaches the caller as a field inside the risk table that comes back with the answer: the stated ratio for what a regulatory-approval delay does to claim value. Sector data in a separate file states the same 3x in prose.

Do you have something running on the nuclear side?

What this engine does is written above. Whether it is any use on your own file is a separate question, and we find that out by talking.