@vypdev/copilot 3.10.9 → 3.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/build/api/index.js +27 -5
- package/build/api/src/domain/progress_capacity_diagnostic.d.ts +15 -0
- package/build/api/src/domain/progress_response_diagnostic.d.ts +1 -1
- package/build/cli/index.js +67 -28
- package/build/deployment_recovery/index.js +21 -1
- package/build/github_action/index.js +67 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
|
|
20
20
|
For example, a maintainer starts an admitted issue with `in-progress`. Copilot creates and verifies its branch. A developer or an authorized bot request contributes changes on that exact branch. A linked PR receives review findings and runs the repository's checks. After an authorized merge, a separately launched release can promote the accepted production commit and reconcile it into development.
|
|
21
21
|
|
|
22
|
+
Commit progress assessments reserve publication space for the complete requirement
|
|
23
|
+
inventory before assigning text to each batch. Every accepted batch shares that
|
|
24
|
+
hard allocation, and progress publishes only after complete same-head evidence
|
|
25
|
+
and freshness checks. See [progress assessment and limits](https://docs.page/vypdev/copilot/issues/branch-management).
|
|
26
|
+
|
|
22
27
|
```mermaid
|
|
23
28
|
flowchart LR
|
|
24
29
|
I[Issue and plan] --> B[Verified working branch]
|
package/build/api/index.js
CHANGED
|
@@ -2894,7 +2894,7 @@ function progressAssessmentFactLimit(requirements, anchors = {}) {
|
|
|
2894
2894
|
const sourceLineId = requirementId !== 'none' && (0, progress_response_diagnostic_1.isProgressSourceLineId)(anchors[id]) ? anchors[id] : 'none';
|
|
2895
2895
|
throw new application_error_1.ApplicationError('validation.evidence-too-large', 'Original progress citations cannot fit the unchanged assessment text limits. Existing progress was retained.', {
|
|
2896
2896
|
recovery: { id: 'progress-assessment-capacity-exceeded', variables: {
|
|
2897
|
-
phase: 'assessment', reason: 'assessment-text-limit', field: `$.requirements[${index}].summary
|
|
2897
|
+
phase: 'assessment', reason: 'assessment-text-limit', field: index < 32 ? `$.requirements[${index}].summary` : '$.requirements', requirementId, sourceLineId,
|
|
2898
2898
|
} },
|
|
2899
2899
|
});
|
|
2900
2900
|
}
|
|
@@ -3346,12 +3346,18 @@ function parseScopedProgressResponse(response, locale, scope, anchors = {}) {
|
|
|
3346
3346
|
reject('requirement-summary-invalid', `${field}.summary`, id);
|
|
3347
3347
|
if (fact.status === 'supported') {
|
|
3348
3348
|
if (fact.remaining !== null)
|
|
3349
|
-
reject('requirement-remaining-
|
|
3349
|
+
reject('requirement-remaining-null-required', `${field}.remaining`, id);
|
|
3350
3350
|
if (fact.evidence !== 'source-only')
|
|
3351
3351
|
reject('requirement-evidence-mismatch', `${field}.evidence`, id);
|
|
3352
3352
|
}
|
|
3353
|
-
else
|
|
3354
|
-
|
|
3353
|
+
else {
|
|
3354
|
+
if (typeof fact.remaining !== 'string')
|
|
3355
|
+
reject('requirement-remaining-string-required', `${field}.remaining`, id);
|
|
3356
|
+
else if (!fact.remaining.trim())
|
|
3357
|
+
reject('requirement-remaining-blank', `${field}.remaining`, id);
|
|
3358
|
+
else if ([...fact.remaining].length > MAX_FACT)
|
|
3359
|
+
reject('requirement-remaining-too-long', `${field}.remaining`, id);
|
|
3360
|
+
}
|
|
3355
3361
|
return { id, status: fact.status, summary: fact.summary, remaining: fact.remaining };
|
|
3356
3362
|
});
|
|
3357
3363
|
const ordered = scope.requirements.map(requirement => ({ requirement, fact: entries.find(entry => entry.id === requirement.id) }));
|
|
@@ -9784,6 +9790,8 @@ exports.PROGRESS_CAPACITY_DIMENSIONS = Object.freeze({
|
|
|
9784
9790
|
'minimum-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
9785
9791
|
'evidence-unit-count': rule(['aggregate'], 'units', ['minimum']),
|
|
9786
9792
|
'aggregate-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
9793
|
+
'assessment-summary-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
9794
|
+
'assessment-remaining-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
9787
9795
|
'invalid-allocation': rule(['input', 'source', 'scope', 'partition', 'aggregate', 'assessment'], 'bytes', ['unavailable']),
|
|
9788
9796
|
});
|
|
9789
9797
|
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -9808,6 +9816,15 @@ function normalizeProgressCapacityContext(value) {
|
|
|
9808
9816
|
return invalid();
|
|
9809
9817
|
return Object.freeze({ kind: 'source-line', sourceLineId: value.sourceLineId });
|
|
9810
9818
|
}
|
|
9819
|
+
if (value.kind === 'assessment') {
|
|
9820
|
+
if (!exact(value, ['kind', 'requirementCount', 'batch', 'requirementId'])
|
|
9821
|
+
|| !count(value.requirementCount) || value.requirementCount < 1 || value.requirementCount > 256
|
|
9822
|
+
|| !count(value.batch) || value.batch > value.requirementCount
|
|
9823
|
+
|| !(value.requirementId === 'none' || (0, progress_response_diagnostic_1.isProgressRequirementId)(value.requirementId))
|
|
9824
|
+
|| (value.batch === 0 && value.requirementId !== 'none'))
|
|
9825
|
+
return invalid();
|
|
9826
|
+
return Object.freeze({ kind: 'assessment', requirementCount: value.requirementCount, batch: value.batch, requirementId: value.requirementId });
|
|
9827
|
+
}
|
|
9811
9828
|
if (value.kind !== 'comparison' || !exact(value, ['kind', 'baseSha', 'headSha', 'manifestDigest', 'requiredPathsDigest',
|
|
9812
9829
|
'reviewedPathsDigest', 'uncoveredPathsDigest', 'requiredPathCount', 'reviewedPathCount', 'uncoveredPathCount', 'paths', 'sourceLineId'])
|
|
9813
9830
|
|| !oid(value.baseSha) || !oid(value.headSha) || !(value.manifestDigest === 'none' || digest(value.manifestDigest))
|
|
@@ -9846,6 +9863,9 @@ function normalizeProgressCapacityDiagnostic(value) {
|
|
|
9846
9863
|
&& (value.bound === 'minimum' ? value.observedCount >= value.supportedLimit : value.observedCount <= value.supportedLimit))
|
|
9847
9864
|
return invalid();
|
|
9848
9865
|
const context = normalizeProgressCapacityContext(value.context);
|
|
9866
|
+
if (context.kind === 'assessment' && (!['assessment-summary-points', 'assessment-remaining-points'].includes(dimension)
|
|
9867
|
+
|| (value.phase === 'aggregate' ? context.batch !== 0 : context.batch === 0)))
|
|
9868
|
+
return invalid();
|
|
9849
9869
|
const sourceLineId = context.kind === 'source-line' || context.kind === 'comparison' ? context.sourceLineId : 'none';
|
|
9850
9870
|
if (sourceLineId !== 'none' && (value.phase !== 'scope'
|
|
9851
9871
|
|| !['source-line-count', 'source-line-points'].includes(dimension)))
|
|
@@ -10037,7 +10057,9 @@ exports.PROGRESS_RESPONSE_REASONS = Object.freeze({
|
|
|
10037
10057
|
'partition-file-invalid', 'partition-unit-invalid', 'partition-facts-invalid']),
|
|
10038
10058
|
assessment: Object.freeze([...schemaReasons, 'requirements-incomplete', 'progress-invalid', 'requirement-shape-invalid', 'requirement-id-invalid',
|
|
10039
10059
|
'requirement-id-duplicate', 'scope-uncertain', 'requirement-status-invalid', 'requirement-evidence-invalid', 'requirement-summary-invalid',
|
|
10040
|
-
'requirement-remaining-invalid', 'requirement-
|
|
10060
|
+
'requirement-remaining-invalid', 'requirement-remaining-null-required', 'requirement-remaining-string-required',
|
|
10061
|
+
'requirement-remaining-blank', 'requirement-remaining-too-long',
|
|
10062
|
+
'requirement-evidence-mismatch', 'progress-completion-mismatch', 'assessment-text-limit']),
|
|
10041
10063
|
});
|
|
10042
10064
|
const fieldPatterns = Object.freeze({
|
|
10043
10065
|
scope: /^\$(?:\.outputLocale|\.lines(?:\[(0|[1-9]\d{0,3})\](?:\.(?:id|kind|sameAs))?)?)?$/u,
|
|
@@ -83,6 +83,16 @@ export declare const PROGRESS_CAPACITY_DIMENSIONS: Readonly<{
|
|
|
83
83
|
unit: ProgressCapacityUnit;
|
|
84
84
|
bounds: readonly ProgressCapacityBound[];
|
|
85
85
|
}>;
|
|
86
|
+
'assessment-summary-points': Readonly<{
|
|
87
|
+
phases: readonly ProgressCapacityPhase[];
|
|
88
|
+
unit: ProgressCapacityUnit;
|
|
89
|
+
bounds: readonly ProgressCapacityBound[];
|
|
90
|
+
}>;
|
|
91
|
+
'assessment-remaining-points': Readonly<{
|
|
92
|
+
phases: readonly ProgressCapacityPhase[];
|
|
93
|
+
unit: ProgressCapacityUnit;
|
|
94
|
+
bounds: readonly ProgressCapacityBound[];
|
|
95
|
+
}>;
|
|
86
96
|
'invalid-allocation': Readonly<{
|
|
87
97
|
phases: readonly ProgressCapacityPhase[];
|
|
88
98
|
unit: ProgressCapacityUnit;
|
|
@@ -95,6 +105,11 @@ export type ProgressCapacityContext = Readonly<{
|
|
|
95
105
|
}> | Readonly<{
|
|
96
106
|
kind: 'source-line';
|
|
97
107
|
sourceLineId: string;
|
|
108
|
+
}> | Readonly<{
|
|
109
|
+
kind: 'assessment';
|
|
110
|
+
requirementCount: number;
|
|
111
|
+
batch: number;
|
|
112
|
+
requirementId: string;
|
|
98
113
|
}> | Readonly<{
|
|
99
114
|
kind: 'comparison';
|
|
100
115
|
baseSha: string;
|
|
@@ -3,7 +3,7 @@ export type ProgressResponsePhase = typeof PROGRESS_RESPONSE_PHASES[number];
|
|
|
3
3
|
export declare const PROGRESS_RESPONSE_REASONS: Readonly<{
|
|
4
4
|
scope: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "scope-incomplete", "scope-entry-invalid", "scope-source-id-invalid", "scope-source-id-duplicate", "scope-classification-invalid", "scope-clause-limit", "scope-no-requirements", "scope-budget"];
|
|
5
5
|
partition: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "partition-shape-invalid", "partition-id-invalid", "partition-files-incomplete", "partition-file-invalid", "partition-unit-invalid", "partition-facts-invalid"];
|
|
6
|
-
assessment: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "requirements-incomplete", "progress-invalid", "requirement-shape-invalid", "requirement-id-invalid", "requirement-id-duplicate", "scope-uncertain", "requirement-status-invalid", "requirement-evidence-invalid", "requirement-summary-invalid", "requirement-remaining-invalid", "requirement-evidence-mismatch", "progress-completion-mismatch", "assessment-text-limit"];
|
|
6
|
+
assessment: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "requirements-incomplete", "progress-invalid", "requirement-shape-invalid", "requirement-id-invalid", "requirement-id-duplicate", "scope-uncertain", "requirement-status-invalid", "requirement-evidence-invalid", "requirement-summary-invalid", "requirement-remaining-invalid", "requirement-remaining-null-required", "requirement-remaining-string-required", "requirement-remaining-blank", "requirement-remaining-too-long", "requirement-evidence-mismatch", "progress-completion-mismatch", "assessment-text-limit"];
|
|
7
7
|
}>;
|
|
8
8
|
export type ProgressResponseReason = typeof PROGRESS_RESPONSE_REASONS[ProgressResponsePhase][number];
|
|
9
9
|
export type ProgressResponseDiagnosticFacts = Readonly<{
|
package/build/cli/index.js
CHANGED
|
@@ -46838,7 +46838,7 @@ function progressAssessmentFactLimit(requirements, anchors = {}) {
|
|
|
46838
46838
|
const sourceLineId = requirementId !== 'none' && (0, progress_response_diagnostic_1.isProgressSourceLineId)(anchors[id]) ? anchors[id] : 'none';
|
|
46839
46839
|
throw new application_error_1.ApplicationError('validation.evidence-too-large', 'Original progress citations cannot fit the unchanged assessment text limits. Existing progress was retained.', {
|
|
46840
46840
|
recovery: { id: 'progress-assessment-capacity-exceeded', variables: {
|
|
46841
|
-
phase: 'assessment', reason: 'assessment-text-limit', field: `$.requirements[${index}].summary
|
|
46841
|
+
phase: 'assessment', reason: 'assessment-text-limit', field: index < 32 ? `$.requirements[${index}].summary` : '$.requirements', requirementId, sourceLineId,
|
|
46842
46842
|
} },
|
|
46843
46843
|
});
|
|
46844
46844
|
}
|
|
@@ -46878,6 +46878,7 @@ const progress_response_rejection_policy_1 = __nccwpck_require__(43023);
|
|
|
46878
46878
|
const progress_evidence_protocol_policy_1 = __nccwpck_require__(37124);
|
|
46879
46879
|
const progress_evidence_path_1 = __nccwpck_require__(25887);
|
|
46880
46880
|
const progress_assessment_capacity_policy_1 = __nccwpck_require__(67329);
|
|
46881
|
+
const progress_capacity_failure_1 = __nccwpck_require__(6457);
|
|
46881
46882
|
exports.PROGRESS_BATCH_PROFILE = Object.freeze({ sourceLines: 32, clauses: 256, bytes: 262144,
|
|
46882
46883
|
assessmentClauses: 32, calls: 120, milliseconds: 1800000 });
|
|
46883
46884
|
const digest = (value) => (0, node_crypto_1.createHash)('sha256').update(JSON.stringify(value)).digest('hex');
|
|
@@ -46986,26 +46987,22 @@ function progressBatchDisplayScope(batch, compact) {
|
|
|
46986
46987
|
return { ...requirement, quote: (source.origin === 'draft' ? 'SDD ' : '') + source.id };
|
|
46987
46988
|
}) } : batch.scope;
|
|
46988
46989
|
}
|
|
46989
|
-
/**
|
|
46990
|
-
function
|
|
46990
|
+
/** One hard allocation reserves every source reference, separator and nonempty fact. */
|
|
46991
|
+
function aggregateFactLimit(manifest, compact, anchors) {
|
|
46991
46992
|
const display = progressBatchDisplayScope({ id: '', ordinal: 0, scope: manifest.scope }, compact);
|
|
46992
|
-
|
|
46993
|
-
const limit = Math.min(progress_assessment_capacity_policy_1.MAX_PROGRESS_FACT_POINTS, Math.floor((progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS - fixed) / display.requirements.length));
|
|
46994
|
-
if (limit < 1)
|
|
46995
|
-
throw (0, progress_batch_rejection_policy_1.progressBatchRejected)('aggregate-capacity');
|
|
46996
|
-
return limit;
|
|
46993
|
+
return (0, progress_assessment_capacity_policy_1.progressAssessmentFactLimit)(display.requirements, anchors);
|
|
46997
46994
|
}
|
|
46998
46995
|
function progressBatchResponseSchema(manifest, batch, anchors, compact) {
|
|
46999
46996
|
const schema = (0, progress_scope_policy_1.scopedProgressResponseSchema)(progressBatchDisplayScope(batch, compact), anchors);
|
|
47000
|
-
const
|
|
47001
|
-
const description = `
|
|
46997
|
+
const factLimit = aggregateFactLimit(manifest, compact, anchors);
|
|
46998
|
+
const description = `Each fact has a hard ${factLimit}-Unicode-code-point aggregate allocation. Use one short factual phrase. Each complete publication field has 8000 points shared across all ${manifest.scope.requirements.length} requirements.`;
|
|
47002
46999
|
return { ...schema, properties: { ...schema.properties,
|
|
47003
47000
|
manifestDigest: { type: 'string', enum: [manifest.digest] }, batchId: { type: 'string', enum: [batch.id] },
|
|
47004
47001
|
headSha: { type: 'string', enum: [manifest.headSha] },
|
|
47005
47002
|
requirements: { ...schema.properties.requirements, items: { ...schema.properties.requirements.items,
|
|
47006
47003
|
properties: { ...schema.properties.requirements.items.properties,
|
|
47007
|
-
summary: { ...schema.properties.requirements.items.properties.summary, description },
|
|
47008
|
-
remaining: { ...schema.properties.requirements.items.properties.remaining, description },
|
|
47004
|
+
summary: { ...schema.properties.requirements.items.properties.summary, maxLength: factLimit, description },
|
|
47005
|
+
remaining: { ...schema.properties.requirements.items.properties.remaining, maxLength: factLimit, description },
|
|
47009
47006
|
citations: { type: 'array', minItems: 1, maxItems: 8,
|
|
47010
47007
|
items: { type: 'string', enum: manifest.evidence.filter(reference => !reference.generated).map(reference => reference.id) } } },
|
|
47011
47008
|
required: [...schema.properties.requirements.items.required, 'citations'] } } },
|
|
@@ -47024,15 +47021,22 @@ function readProgressAssessmentEvidence(response, manifest, batch, locale, ancho
|
|
|
47024
47021
|
fail('receipt-coverage', missing?.id);
|
|
47025
47022
|
}
|
|
47026
47023
|
const citations = [];
|
|
47027
|
-
const factLimit = (
|
|
47024
|
+
const factLimit = aggregateFactLimit(manifest, compact, anchors);
|
|
47028
47025
|
const facts = payload.requirements.map(value => {
|
|
47029
47026
|
if (!record(value) || !exact(value, ['id', 'status', 'evidence', 'summary', 'remaining', 'citations']))
|
|
47030
47027
|
return fail('receipt-coverage');
|
|
47031
47028
|
const id = batch.scope.requirements.find(requirement => requirement.id === value.id)?.id;
|
|
47032
47029
|
if (!id)
|
|
47033
47030
|
return fail('receipt-coverage');
|
|
47034
|
-
|
|
47035
|
-
|
|
47031
|
+
for (const field of ['summary', 'remaining']) {
|
|
47032
|
+
const text = value[field];
|
|
47033
|
+
if (typeof text === 'string' && [...text].length > factLimit)
|
|
47034
|
+
throw new progress_capacity_failure_1.ProgressCapacityFailure({
|
|
47035
|
+
phase: 'assessment', dimension: field === 'summary' ? 'assessment-summary-points' : 'assessment-remaining-points',
|
|
47036
|
+
observedCount: [...text].length, supportedLimit: factLimit,
|
|
47037
|
+
context: { kind: 'assessment', requirementCount: manifest.scope.requirements.length, batch: batch.ordinal, requirementId: id },
|
|
47038
|
+
});
|
|
47039
|
+
}
|
|
47036
47040
|
if (!Array.isArray(value.citations) || value.citations.length < 1 || value.citations.length > 8
|
|
47037
47041
|
|| new Set(value.citations).size !== value.citations.length)
|
|
47038
47042
|
return fail('evidence-missing', id);
|
|
@@ -47088,8 +47092,14 @@ function aggregateProgressAssessmentReceipts(manifest, batches, receipts) {
|
|
|
47088
47092
|
const progress = Math.round(ordered.reduce((sum, receipt) => sum + receipt.result.progress * receipt.requirementIds.length, 0) / ids.length);
|
|
47089
47093
|
const text = (field) => ordered.map(receipt => receipt.result[field]).filter(Boolean).join('\n');
|
|
47090
47094
|
const summary = text('summary'), remaining = text('remaining');
|
|
47091
|
-
|
|
47092
|
-
|
|
47095
|
+
for (const [field, value] of [['summary', summary], ['remaining', remaining]]) {
|
|
47096
|
+
if ([...value].length > progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS)
|
|
47097
|
+
throw new progress_capacity_failure_1.ProgressCapacityFailure({
|
|
47098
|
+
phase: 'aggregate', dimension: field === 'summary' ? 'assessment-summary-points' : 'assessment-remaining-points',
|
|
47099
|
+
observedCount: [...value].length, supportedLimit: progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS,
|
|
47100
|
+
context: { kind: 'assessment', requirementCount: ids.length, batch: 0, requirementId: 'none' },
|
|
47101
|
+
});
|
|
47102
|
+
}
|
|
47093
47103
|
return Object.freeze({ progress: remaining ? Math.min(99, progress) : 100, summary, remaining, reasoning: '', publicationId: manifest.digest });
|
|
47094
47104
|
}
|
|
47095
47105
|
|
|
@@ -47228,11 +47238,13 @@ exports.ENGLISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
47228
47238
|
capacityAggregateEnvelope: 'receipt envelope and minimum payload reservation', capacityMinimumFacts: 'minimum complete fact reservation',
|
|
47229
47239
|
capacityUnitCount: 'evidence-unit count', capacityAggregateFacts: 'complete aggregate facts', capacityInvalidAllocation: 'invalid capacity allocation',
|
|
47230
47240
|
capacitySourceUnitCount: 'source-unit count',
|
|
47241
|
+
capacityAssessmentSummary: 'progress summary field', capacityAssessmentRemaining: 'progress remaining field',
|
|
47231
47242
|
capacityMaximumMeasurement: 'Measured or required: {observedCount} {unit}; maximum available: {supportedLimit} {unit} ({countKind}).',
|
|
47232
47243
|
capacityMinimumMeasurement: 'Measured: {observedCount} {unit}; minimum required: {supportedLimit} {unit} ({countKind}).',
|
|
47233
47244
|
capacityUnavailableMeasurement: 'Usage and applicable allocation are unavailable.',
|
|
47234
47245
|
capacityContextUnavailable: 'Source and path-coverage context are unavailable.',
|
|
47235
47246
|
capacitySourceLine: 'Original physical source line: {sourceLineId}.',
|
|
47247
|
+
capacityAssessmentContext: 'Complete inventory: {requirementCount} requirements. Batch: {batch}; requirement: {requirementId}. Batch 0 identifies complete reduction; none means no single requirement is attributed.',
|
|
47236
47248
|
capacityManifestUnavailable: 'not available at this boundary', capacityNoPaths: 'no uncovered paths',
|
|
47237
47249
|
capacityComparison: 'Pinned comparison: {baseSha} → {headSha}. Required-path inventory: {requiredPathsDigest}; source manifest: {manifestDigest}. Accepted progress path receipts: {reviewedPathCount}/{requiredPathCount}; uncovered: {uncoveredPathCount}. Receipt-path inventory: {reviewedPathsDigest}; uncovered-path inventory: {uncoveredPathsDigest}. Paths: {paths}.',
|
|
47238
47250
|
};
|
|
@@ -47249,11 +47261,13 @@ exports.SPANISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
47249
47261
|
capacityAggregateEnvelope: 'envoltura de recibos y reserva mínima de contenido', capacityMinimumFacts: 'reserva mínima de hechos completos',
|
|
47250
47262
|
capacityUnitCount: 'cantidad de unidades de evidencia', capacityAggregateFacts: 'hechos completos del agregado', capacityInvalidAllocation: 'asignación de capacidad no válida',
|
|
47251
47263
|
capacitySourceUnitCount: 'cantidad de unidades de origen',
|
|
47264
|
+
capacityAssessmentSummary: 'campo de resumen del progreso', capacityAssessmentRemaining: 'campo de trabajo pendiente del progreso',
|
|
47252
47265
|
capacityMaximumMeasurement: 'Medido o requerido: {observedCount} {unit}; máximo disponible: {supportedLimit} {unit} ({countKind}).',
|
|
47253
47266
|
capacityMinimumMeasurement: 'Medido: {observedCount} {unit}; mínimo requerido: {supportedLimit} {unit} ({countKind}).',
|
|
47254
47267
|
capacityUnavailableMeasurement: 'El uso y la asignación aplicable no están disponibles.',
|
|
47255
47268
|
capacityContextUnavailable: 'El contexto de origen y cobertura de rutas no está disponible.',
|
|
47256
47269
|
capacitySourceLine: 'Línea física de origen: {sourceLineId}.',
|
|
47270
|
+
capacityAssessmentContext: 'Inventario completo: {requirementCount} requisitos. Lote: {batch}; requisito: {requirementId}. El lote 0 identifica la reducción completa; none indica que no se atribuye a un único requisito.',
|
|
47257
47271
|
capacityManifestUnavailable: 'no disponible en este límite', capacityNoPaths: 'ninguna ruta sin cubrir',
|
|
47258
47272
|
capacityComparison: 'Comparación fijada: {baseSha} → {headSha}. Inventario de rutas requeridas: {requiredPathsDigest}; manifiesto de origen: {manifestDigest}. Recibos de rutas de progreso aceptados: {reviewedPathCount}/{requiredPathCount}; sin cubrir: {uncoveredPathCount}. Inventario de rutas con recibo: {reviewedPathsDigest}; inventario de rutas sin cubrir: {uncoveredPathsDigest}. Rutas: {paths}.',
|
|
47259
47273
|
};
|
|
@@ -47289,6 +47303,7 @@ const PHASES = {
|
|
|
47289
47303
|
};
|
|
47290
47304
|
const UNITS = { bytes: 'capacityBytes', parts: 'capacityParts', lines: 'capacityLines', 'code-points': 'capacityPoints', units: 'capacityUnits' };
|
|
47291
47305
|
const DIMENSIONS = {
|
|
47306
|
+
'assessment-summary-points': 'capacityAssessmentSummary', 'assessment-remaining-points': 'capacityAssessmentRemaining',
|
|
47292
47307
|
'source-unit-bytes': 'capacitySourceUnit', 'source-part-bytes': 'capacitySourcePart', 'source-part-count': 'capacityPartCount',
|
|
47293
47308
|
'source-unit-count': 'capacitySourceUnitCount',
|
|
47294
47309
|
'source-manifest-bytes': 'capacityManifest', 'source-line-count': 'capacityLineCount', 'source-line-points': 'capacityLinePoints',
|
|
@@ -47306,13 +47321,14 @@ function progressCapacityPresentation(input, message) {
|
|
|
47306
47321
|
const measurement = label(facts.bound === 'minimum' ? 'capacityMinimumMeasurement' : facts.bound === 'maximum' ? 'capacityMaximumMeasurement' : 'capacityUnavailableMeasurement', { observedCount, supportedLimit, countKind, unit: label(UNITS[facts.unit]) });
|
|
47307
47322
|
const source = facts.context;
|
|
47308
47323
|
const context = source.kind === 'unavailable' ? label('capacityContextUnavailable')
|
|
47309
|
-
: source.kind === '
|
|
47310
|
-
: label('
|
|
47311
|
-
|
|
47312
|
-
|
|
47313
|
-
|
|
47314
|
-
|
|
47315
|
-
|
|
47324
|
+
: source.kind === 'assessment' ? label('capacityAssessmentContext', source)
|
|
47325
|
+
: source.kind === 'source-line' ? label('capacitySourceLine', { sourceLineId: source.sourceLineId })
|
|
47326
|
+
: label('capacityComparison', { baseSha: source.baseSha, headSha: source.headSha, requiredPathsDigest: source.requiredPathsDigest,
|
|
47327
|
+
reviewedPathsDigest: source.reviewedPathsDigest, uncoveredPathsDigest: source.uncoveredPathsDigest,
|
|
47328
|
+
manifestDigest: source.manifestDigest === 'none' ? label('capacityManifestUnavailable') : source.manifestDigest,
|
|
47329
|
+
requiredPathCount: source.requiredPathCount, reviewedPathCount: source.reviewedPathCount, uncoveredPathCount: source.uncoveredPathCount,
|
|
47330
|
+
paths: source.paths.length ? source.paths.map(progress_evidence_path_1.renderProgressEvidencePath).join('; ') : label('capacityNoPaths') })
|
|
47331
|
+
+ (source.sourceLineId === 'none' ? '' : ` ${label('capacitySourceLine', { sourceLineId: source.sourceLineId })}`);
|
|
47316
47332
|
return Object.freeze({ phase: label(PHASES[facts.phase]), dimension: label(DIMENSIONS[facts.dimension]), measurement, context });
|
|
47317
47333
|
}
|
|
47318
47334
|
|
|
@@ -48465,12 +48481,18 @@ function parseScopedProgressResponse(response, locale, scope, anchors = {}) {
|
|
|
48465
48481
|
reject('requirement-summary-invalid', `${field}.summary`, id);
|
|
48466
48482
|
if (fact.status === 'supported') {
|
|
48467
48483
|
if (fact.remaining !== null)
|
|
48468
|
-
reject('requirement-remaining-
|
|
48484
|
+
reject('requirement-remaining-null-required', `${field}.remaining`, id);
|
|
48469
48485
|
if (fact.evidence !== 'source-only')
|
|
48470
48486
|
reject('requirement-evidence-mismatch', `${field}.evidence`, id);
|
|
48471
48487
|
}
|
|
48472
|
-
else
|
|
48473
|
-
|
|
48488
|
+
else {
|
|
48489
|
+
if (typeof fact.remaining !== 'string')
|
|
48490
|
+
reject('requirement-remaining-string-required', `${field}.remaining`, id);
|
|
48491
|
+
else if (!fact.remaining.trim())
|
|
48492
|
+
reject('requirement-remaining-blank', `${field}.remaining`, id);
|
|
48493
|
+
else if ([...fact.remaining].length > MAX_FACT)
|
|
48494
|
+
reject('requirement-remaining-too-long', `${field}.remaining`, id);
|
|
48495
|
+
}
|
|
48474
48496
|
return { id, status: fact.status, summary: fact.summary, remaining: fact.remaining };
|
|
48475
48497
|
});
|
|
48476
48498
|
const ordered = scope.requirements.map(requirement => ({ requirement, fact: entries.find(entry => entry.id === requirement.id) }));
|
|
@@ -61254,6 +61276,7 @@ async function analyzeProgressBatches(context, issueDescription, captured, diff,
|
|
|
61254
61276
|
bounded.verify();
|
|
61255
61277
|
return (0, progress_batch_policy_1.aggregateProgressAssessmentReceipts)(manifest, batches, receipts);
|
|
61256
61278
|
};
|
|
61279
|
+
(0, logging_ports_1.logInfo)(`Reducing complete same-head assessment: ${scope.requirements.length} requirements, ${receipts.length} of ${batches.length} verified batches; summary and remaining each have an 8000-Unicode-code-point publication limit.`);
|
|
61257
61280
|
const attemptResult = verifyAssessment();
|
|
61258
61281
|
(0, logging_ports_1.logInfo)(`Complete same-head acceptance evidence verified: ${scope.requirements.length} requirements, ${receipts.length} of ${batches.length} batches, ${bounded.calls()} of ${progress_batch_policy_1.PROGRESS_BATCH_PROFILE.calls} calls. Publication identity ${manifest.digest}.`);
|
|
61259
61282
|
return { attemptResult, scopeManifestDigest: manifest.digest, verifyAssessment };
|
|
@@ -102885,6 +102908,8 @@ exports.PROGRESS_CAPACITY_DIMENSIONS = Object.freeze({
|
|
|
102885
102908
|
'minimum-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
102886
102909
|
'evidence-unit-count': rule(['aggregate'], 'units', ['minimum']),
|
|
102887
102910
|
'aggregate-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
102911
|
+
'assessment-summary-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
102912
|
+
'assessment-remaining-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
102888
102913
|
'invalid-allocation': rule(['input', 'source', 'scope', 'partition', 'aggregate', 'assessment'], 'bytes', ['unavailable']),
|
|
102889
102914
|
});
|
|
102890
102915
|
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -102909,6 +102934,15 @@ function normalizeProgressCapacityContext(value) {
|
|
|
102909
102934
|
return invalid();
|
|
102910
102935
|
return Object.freeze({ kind: 'source-line', sourceLineId: value.sourceLineId });
|
|
102911
102936
|
}
|
|
102937
|
+
if (value.kind === 'assessment') {
|
|
102938
|
+
if (!exact(value, ['kind', 'requirementCount', 'batch', 'requirementId'])
|
|
102939
|
+
|| !count(value.requirementCount) || value.requirementCount < 1 || value.requirementCount > 256
|
|
102940
|
+
|| !count(value.batch) || value.batch > value.requirementCount
|
|
102941
|
+
|| !(value.requirementId === 'none' || (0, progress_response_diagnostic_1.isProgressRequirementId)(value.requirementId))
|
|
102942
|
+
|| (value.batch === 0 && value.requirementId !== 'none'))
|
|
102943
|
+
return invalid();
|
|
102944
|
+
return Object.freeze({ kind: 'assessment', requirementCount: value.requirementCount, batch: value.batch, requirementId: value.requirementId });
|
|
102945
|
+
}
|
|
102912
102946
|
if (value.kind !== 'comparison' || !exact(value, ['kind', 'baseSha', 'headSha', 'manifestDigest', 'requiredPathsDigest',
|
|
102913
102947
|
'reviewedPathsDigest', 'uncoveredPathsDigest', 'requiredPathCount', 'reviewedPathCount', 'uncoveredPathCount', 'paths', 'sourceLineId'])
|
|
102914
102948
|
|| !oid(value.baseSha) || !oid(value.headSha) || !(value.manifestDigest === 'none' || digest(value.manifestDigest))
|
|
@@ -102947,6 +102981,9 @@ function normalizeProgressCapacityDiagnostic(value) {
|
|
|
102947
102981
|
&& (value.bound === 'minimum' ? value.observedCount >= value.supportedLimit : value.observedCount <= value.supportedLimit))
|
|
102948
102982
|
return invalid();
|
|
102949
102983
|
const context = normalizeProgressCapacityContext(value.context);
|
|
102984
|
+
if (context.kind === 'assessment' && (!['assessment-summary-points', 'assessment-remaining-points'].includes(dimension)
|
|
102985
|
+
|| (value.phase === 'aggregate' ? context.batch !== 0 : context.batch === 0)))
|
|
102986
|
+
return invalid();
|
|
102950
102987
|
const sourceLineId = context.kind === 'source-line' || context.kind === 'comparison' ? context.sourceLineId : 'none';
|
|
102951
102988
|
if (sourceLineId !== 'none' && (value.phase !== 'scope'
|
|
102952
102989
|
|| !['source-line-count', 'source-line-points'].includes(dimension)))
|
|
@@ -103138,7 +103175,9 @@ exports.PROGRESS_RESPONSE_REASONS = Object.freeze({
|
|
|
103138
103175
|
'partition-file-invalid', 'partition-unit-invalid', 'partition-facts-invalid']),
|
|
103139
103176
|
assessment: Object.freeze([...schemaReasons, 'requirements-incomplete', 'progress-invalid', 'requirement-shape-invalid', 'requirement-id-invalid',
|
|
103140
103177
|
'requirement-id-duplicate', 'scope-uncertain', 'requirement-status-invalid', 'requirement-evidence-invalid', 'requirement-summary-invalid',
|
|
103141
|
-
'requirement-remaining-invalid', 'requirement-
|
|
103178
|
+
'requirement-remaining-invalid', 'requirement-remaining-null-required', 'requirement-remaining-string-required',
|
|
103179
|
+
'requirement-remaining-blank', 'requirement-remaining-too-long',
|
|
103180
|
+
'requirement-evidence-mismatch', 'progress-completion-mismatch', 'assessment-text-limit']),
|
|
103142
103181
|
});
|
|
103143
103182
|
const fieldPatterns = Object.freeze({
|
|
103144
103183
|
scope: /^\$(?:\.outputLocale|\.lines(?:\[(0|[1-9]\d{0,3})\](?:\.(?:id|kind|sameAs))?)?)?$/u,
|
|
@@ -33760,11 +33760,13 @@ exports.ENGLISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
33760
33760
|
capacityAggregateEnvelope: 'receipt envelope and minimum payload reservation', capacityMinimumFacts: 'minimum complete fact reservation',
|
|
33761
33761
|
capacityUnitCount: 'evidence-unit count', capacityAggregateFacts: 'complete aggregate facts', capacityInvalidAllocation: 'invalid capacity allocation',
|
|
33762
33762
|
capacitySourceUnitCount: 'source-unit count',
|
|
33763
|
+
capacityAssessmentSummary: 'progress summary field', capacityAssessmentRemaining: 'progress remaining field',
|
|
33763
33764
|
capacityMaximumMeasurement: 'Measured or required: {observedCount} {unit}; maximum available: {supportedLimit} {unit} ({countKind}).',
|
|
33764
33765
|
capacityMinimumMeasurement: 'Measured: {observedCount} {unit}; minimum required: {supportedLimit} {unit} ({countKind}).',
|
|
33765
33766
|
capacityUnavailableMeasurement: 'Usage and applicable allocation are unavailable.',
|
|
33766
33767
|
capacityContextUnavailable: 'Source and path-coverage context are unavailable.',
|
|
33767
33768
|
capacitySourceLine: 'Original physical source line: {sourceLineId}.',
|
|
33769
|
+
capacityAssessmentContext: 'Complete inventory: {requirementCount} requirements. Batch: {batch}; requirement: {requirementId}. Batch 0 identifies complete reduction; none means no single requirement is attributed.',
|
|
33768
33770
|
capacityManifestUnavailable: 'not available at this boundary', capacityNoPaths: 'no uncovered paths',
|
|
33769
33771
|
capacityComparison: 'Pinned comparison: {baseSha} → {headSha}. Required-path inventory: {requiredPathsDigest}; source manifest: {manifestDigest}. Accepted progress path receipts: {reviewedPathCount}/{requiredPathCount}; uncovered: {uncoveredPathCount}. Receipt-path inventory: {reviewedPathsDigest}; uncovered-path inventory: {uncoveredPathsDigest}. Paths: {paths}.',
|
|
33770
33772
|
};
|
|
@@ -33781,11 +33783,13 @@ exports.SPANISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
33781
33783
|
capacityAggregateEnvelope: 'envoltura de recibos y reserva mínima de contenido', capacityMinimumFacts: 'reserva mínima de hechos completos',
|
|
33782
33784
|
capacityUnitCount: 'cantidad de unidades de evidencia', capacityAggregateFacts: 'hechos completos del agregado', capacityInvalidAllocation: 'asignación de capacidad no válida',
|
|
33783
33785
|
capacitySourceUnitCount: 'cantidad de unidades de origen',
|
|
33786
|
+
capacityAssessmentSummary: 'campo de resumen del progreso', capacityAssessmentRemaining: 'campo de trabajo pendiente del progreso',
|
|
33784
33787
|
capacityMaximumMeasurement: 'Medido o requerido: {observedCount} {unit}; máximo disponible: {supportedLimit} {unit} ({countKind}).',
|
|
33785
33788
|
capacityMinimumMeasurement: 'Medido: {observedCount} {unit}; mínimo requerido: {supportedLimit} {unit} ({countKind}).',
|
|
33786
33789
|
capacityUnavailableMeasurement: 'El uso y la asignación aplicable no están disponibles.',
|
|
33787
33790
|
capacityContextUnavailable: 'El contexto de origen y cobertura de rutas no está disponible.',
|
|
33788
33791
|
capacitySourceLine: 'Línea física de origen: {sourceLineId}.',
|
|
33792
|
+
capacityAssessmentContext: 'Inventario completo: {requirementCount} requisitos. Lote: {batch}; requisito: {requirementId}. El lote 0 identifica la reducción completa; none indica que no se atribuye a un único requisito.',
|
|
33789
33793
|
capacityManifestUnavailable: 'no disponible en este límite', capacityNoPaths: 'ninguna ruta sin cubrir',
|
|
33790
33794
|
capacityComparison: 'Comparación fijada: {baseSha} → {headSha}. Inventario de rutas requeridas: {requiredPathsDigest}; manifiesto de origen: {manifestDigest}. Recibos de rutas de progreso aceptados: {reviewedPathCount}/{requiredPathCount}; sin cubrir: {uncoveredPathCount}. Inventario de rutas con recibo: {reviewedPathsDigest}; inventario de rutas sin cubrir: {uncoveredPathsDigest}. Rutas: {paths}.',
|
|
33791
33795
|
};
|
|
@@ -37476,6 +37480,8 @@ exports.PROGRESS_CAPACITY_DIMENSIONS = Object.freeze({
|
|
|
37476
37480
|
'minimum-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
37477
37481
|
'evidence-unit-count': rule(['aggregate'], 'units', ['minimum']),
|
|
37478
37482
|
'aggregate-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
37483
|
+
'assessment-summary-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
37484
|
+
'assessment-remaining-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
37479
37485
|
'invalid-allocation': rule(['input', 'source', 'scope', 'partition', 'aggregate', 'assessment'], 'bytes', ['unavailable']),
|
|
37480
37486
|
});
|
|
37481
37487
|
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -37500,6 +37506,15 @@ function normalizeProgressCapacityContext(value) {
|
|
|
37500
37506
|
return invalid();
|
|
37501
37507
|
return Object.freeze({ kind: 'source-line', sourceLineId: value.sourceLineId });
|
|
37502
37508
|
}
|
|
37509
|
+
if (value.kind === 'assessment') {
|
|
37510
|
+
if (!exact(value, ['kind', 'requirementCount', 'batch', 'requirementId'])
|
|
37511
|
+
|| !count(value.requirementCount) || value.requirementCount < 1 || value.requirementCount > 256
|
|
37512
|
+
|| !count(value.batch) || value.batch > value.requirementCount
|
|
37513
|
+
|| !(value.requirementId === 'none' || (0, progress_response_diagnostic_1.isProgressRequirementId)(value.requirementId))
|
|
37514
|
+
|| (value.batch === 0 && value.requirementId !== 'none'))
|
|
37515
|
+
return invalid();
|
|
37516
|
+
return Object.freeze({ kind: 'assessment', requirementCount: value.requirementCount, batch: value.batch, requirementId: value.requirementId });
|
|
37517
|
+
}
|
|
37503
37518
|
if (value.kind !== 'comparison' || !exact(value, ['kind', 'baseSha', 'headSha', 'manifestDigest', 'requiredPathsDigest',
|
|
37504
37519
|
'reviewedPathsDigest', 'uncoveredPathsDigest', 'requiredPathCount', 'reviewedPathCount', 'uncoveredPathCount', 'paths', 'sourceLineId'])
|
|
37505
37520
|
|| !oid(value.baseSha) || !oid(value.headSha) || !(value.manifestDigest === 'none' || digest(value.manifestDigest))
|
|
@@ -37538,6 +37553,9 @@ function normalizeProgressCapacityDiagnostic(value) {
|
|
|
37538
37553
|
&& (value.bound === 'minimum' ? value.observedCount >= value.supportedLimit : value.observedCount <= value.supportedLimit))
|
|
37539
37554
|
return invalid();
|
|
37540
37555
|
const context = normalizeProgressCapacityContext(value.context);
|
|
37556
|
+
if (context.kind === 'assessment' && (!['assessment-summary-points', 'assessment-remaining-points'].includes(dimension)
|
|
37557
|
+
|| (value.phase === 'aggregate' ? context.batch !== 0 : context.batch === 0)))
|
|
37558
|
+
return invalid();
|
|
37541
37559
|
const sourceLineId = context.kind === 'source-line' || context.kind === 'comparison' ? context.sourceLineId : 'none';
|
|
37542
37560
|
if (sourceLineId !== 'none' && (value.phase !== 'scope'
|
|
37543
37561
|
|| !['source-line-count', 'source-line-points'].includes(dimension)))
|
|
@@ -37729,7 +37747,9 @@ exports.PROGRESS_RESPONSE_REASONS = Object.freeze({
|
|
|
37729
37747
|
'partition-file-invalid', 'partition-unit-invalid', 'partition-facts-invalid']),
|
|
37730
37748
|
assessment: Object.freeze([...schemaReasons, 'requirements-incomplete', 'progress-invalid', 'requirement-shape-invalid', 'requirement-id-invalid',
|
|
37731
37749
|
'requirement-id-duplicate', 'scope-uncertain', 'requirement-status-invalid', 'requirement-evidence-invalid', 'requirement-summary-invalid',
|
|
37732
|
-
'requirement-remaining-invalid', 'requirement-
|
|
37750
|
+
'requirement-remaining-invalid', 'requirement-remaining-null-required', 'requirement-remaining-string-required',
|
|
37751
|
+
'requirement-remaining-blank', 'requirement-remaining-too-long',
|
|
37752
|
+
'requirement-evidence-mismatch', 'progress-completion-mismatch', 'assessment-text-limit']),
|
|
37733
37753
|
});
|
|
37734
37754
|
const fieldPatterns = Object.freeze({
|
|
37735
37755
|
scope: /^\$(?:\.outputLocale|\.lines(?:\[(0|[1-9]\d{0,3})\](?:\.(?:id|kind|sameAs))?)?)?$/u,
|
|
@@ -48699,7 +48699,7 @@ function progressAssessmentFactLimit(requirements, anchors = {}) {
|
|
|
48699
48699
|
const sourceLineId = requirementId !== 'none' && (0, progress_response_diagnostic_1.isProgressSourceLineId)(anchors[id]) ? anchors[id] : 'none';
|
|
48700
48700
|
throw new application_error_1.ApplicationError('validation.evidence-too-large', 'Original progress citations cannot fit the unchanged assessment text limits. Existing progress was retained.', {
|
|
48701
48701
|
recovery: { id: 'progress-assessment-capacity-exceeded', variables: {
|
|
48702
|
-
phase: 'assessment', reason: 'assessment-text-limit', field: `$.requirements[${index}].summary
|
|
48702
|
+
phase: 'assessment', reason: 'assessment-text-limit', field: index < 32 ? `$.requirements[${index}].summary` : '$.requirements', requirementId, sourceLineId,
|
|
48703
48703
|
} },
|
|
48704
48704
|
});
|
|
48705
48705
|
}
|
|
@@ -48739,6 +48739,7 @@ const progress_response_rejection_policy_1 = __nccwpck_require__(43023);
|
|
|
48739
48739
|
const progress_evidence_protocol_policy_1 = __nccwpck_require__(37124);
|
|
48740
48740
|
const progress_evidence_path_1 = __nccwpck_require__(25887);
|
|
48741
48741
|
const progress_assessment_capacity_policy_1 = __nccwpck_require__(67329);
|
|
48742
|
+
const progress_capacity_failure_1 = __nccwpck_require__(6457);
|
|
48742
48743
|
exports.PROGRESS_BATCH_PROFILE = Object.freeze({ sourceLines: 32, clauses: 256, bytes: 262144,
|
|
48743
48744
|
assessmentClauses: 32, calls: 120, milliseconds: 1800000 });
|
|
48744
48745
|
const digest = (value) => (0, node_crypto_1.createHash)('sha256').update(JSON.stringify(value)).digest('hex');
|
|
@@ -48847,26 +48848,22 @@ function progressBatchDisplayScope(batch, compact) {
|
|
|
48847
48848
|
return { ...requirement, quote: (source.origin === 'draft' ? 'SDD ' : '') + source.id };
|
|
48848
48849
|
}) } : batch.scope;
|
|
48849
48850
|
}
|
|
48850
|
-
/**
|
|
48851
|
-
function
|
|
48851
|
+
/** One hard allocation reserves every source reference, separator and nonempty fact. */
|
|
48852
|
+
function aggregateFactLimit(manifest, compact, anchors) {
|
|
48852
48853
|
const display = progressBatchDisplayScope({ id: '', ordinal: 0, scope: manifest.scope }, compact);
|
|
48853
|
-
|
|
48854
|
-
const limit = Math.min(progress_assessment_capacity_policy_1.MAX_PROGRESS_FACT_POINTS, Math.floor((progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS - fixed) / display.requirements.length));
|
|
48855
|
-
if (limit < 1)
|
|
48856
|
-
throw (0, progress_batch_rejection_policy_1.progressBatchRejected)('aggregate-capacity');
|
|
48857
|
-
return limit;
|
|
48854
|
+
return (0, progress_assessment_capacity_policy_1.progressAssessmentFactLimit)(display.requirements, anchors);
|
|
48858
48855
|
}
|
|
48859
48856
|
function progressBatchResponseSchema(manifest, batch, anchors, compact) {
|
|
48860
48857
|
const schema = (0, progress_scope_policy_1.scopedProgressResponseSchema)(progressBatchDisplayScope(batch, compact), anchors);
|
|
48861
|
-
const
|
|
48862
|
-
const description = `
|
|
48858
|
+
const factLimit = aggregateFactLimit(manifest, compact, anchors);
|
|
48859
|
+
const description = `Each fact has a hard ${factLimit}-Unicode-code-point aggregate allocation. Use one short factual phrase. Each complete publication field has 8000 points shared across all ${manifest.scope.requirements.length} requirements.`;
|
|
48863
48860
|
return { ...schema, properties: { ...schema.properties,
|
|
48864
48861
|
manifestDigest: { type: 'string', enum: [manifest.digest] }, batchId: { type: 'string', enum: [batch.id] },
|
|
48865
48862
|
headSha: { type: 'string', enum: [manifest.headSha] },
|
|
48866
48863
|
requirements: { ...schema.properties.requirements, items: { ...schema.properties.requirements.items,
|
|
48867
48864
|
properties: { ...schema.properties.requirements.items.properties,
|
|
48868
|
-
summary: { ...schema.properties.requirements.items.properties.summary, description },
|
|
48869
|
-
remaining: { ...schema.properties.requirements.items.properties.remaining, description },
|
|
48865
|
+
summary: { ...schema.properties.requirements.items.properties.summary, maxLength: factLimit, description },
|
|
48866
|
+
remaining: { ...schema.properties.requirements.items.properties.remaining, maxLength: factLimit, description },
|
|
48870
48867
|
citations: { type: 'array', minItems: 1, maxItems: 8,
|
|
48871
48868
|
items: { type: 'string', enum: manifest.evidence.filter(reference => !reference.generated).map(reference => reference.id) } } },
|
|
48872
48869
|
required: [...schema.properties.requirements.items.required, 'citations'] } } },
|
|
@@ -48885,15 +48882,22 @@ function readProgressAssessmentEvidence(response, manifest, batch, locale, ancho
|
|
|
48885
48882
|
fail('receipt-coverage', missing?.id);
|
|
48886
48883
|
}
|
|
48887
48884
|
const citations = [];
|
|
48888
|
-
const factLimit = (
|
|
48885
|
+
const factLimit = aggregateFactLimit(manifest, compact, anchors);
|
|
48889
48886
|
const facts = payload.requirements.map(value => {
|
|
48890
48887
|
if (!record(value) || !exact(value, ['id', 'status', 'evidence', 'summary', 'remaining', 'citations']))
|
|
48891
48888
|
return fail('receipt-coverage');
|
|
48892
48889
|
const id = batch.scope.requirements.find(requirement => requirement.id === value.id)?.id;
|
|
48893
48890
|
if (!id)
|
|
48894
48891
|
return fail('receipt-coverage');
|
|
48895
|
-
|
|
48896
|
-
|
|
48892
|
+
for (const field of ['summary', 'remaining']) {
|
|
48893
|
+
const text = value[field];
|
|
48894
|
+
if (typeof text === 'string' && [...text].length > factLimit)
|
|
48895
|
+
throw new progress_capacity_failure_1.ProgressCapacityFailure({
|
|
48896
|
+
phase: 'assessment', dimension: field === 'summary' ? 'assessment-summary-points' : 'assessment-remaining-points',
|
|
48897
|
+
observedCount: [...text].length, supportedLimit: factLimit,
|
|
48898
|
+
context: { kind: 'assessment', requirementCount: manifest.scope.requirements.length, batch: batch.ordinal, requirementId: id },
|
|
48899
|
+
});
|
|
48900
|
+
}
|
|
48897
48901
|
if (!Array.isArray(value.citations) || value.citations.length < 1 || value.citations.length > 8
|
|
48898
48902
|
|| new Set(value.citations).size !== value.citations.length)
|
|
48899
48903
|
return fail('evidence-missing', id);
|
|
@@ -48949,8 +48953,14 @@ function aggregateProgressAssessmentReceipts(manifest, batches, receipts) {
|
|
|
48949
48953
|
const progress = Math.round(ordered.reduce((sum, receipt) => sum + receipt.result.progress * receipt.requirementIds.length, 0) / ids.length);
|
|
48950
48954
|
const text = (field) => ordered.map(receipt => receipt.result[field]).filter(Boolean).join('\n');
|
|
48951
48955
|
const summary = text('summary'), remaining = text('remaining');
|
|
48952
|
-
|
|
48953
|
-
|
|
48956
|
+
for (const [field, value] of [['summary', summary], ['remaining', remaining]]) {
|
|
48957
|
+
if ([...value].length > progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS)
|
|
48958
|
+
throw new progress_capacity_failure_1.ProgressCapacityFailure({
|
|
48959
|
+
phase: 'aggregate', dimension: field === 'summary' ? 'assessment-summary-points' : 'assessment-remaining-points',
|
|
48960
|
+
observedCount: [...value].length, supportedLimit: progress_assessment_capacity_policy_1.MAX_PROGRESS_ASSESSMENT_POINTS,
|
|
48961
|
+
context: { kind: 'assessment', requirementCount: ids.length, batch: 0, requirementId: 'none' },
|
|
48962
|
+
});
|
|
48963
|
+
}
|
|
48954
48964
|
return Object.freeze({ progress: remaining ? Math.min(99, progress) : 100, summary, remaining, reasoning: '', publicationId: manifest.digest });
|
|
48955
48965
|
}
|
|
48956
48966
|
|
|
@@ -49089,11 +49099,13 @@ exports.ENGLISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
49089
49099
|
capacityAggregateEnvelope: 'receipt envelope and minimum payload reservation', capacityMinimumFacts: 'minimum complete fact reservation',
|
|
49090
49100
|
capacityUnitCount: 'evidence-unit count', capacityAggregateFacts: 'complete aggregate facts', capacityInvalidAllocation: 'invalid capacity allocation',
|
|
49091
49101
|
capacitySourceUnitCount: 'source-unit count',
|
|
49102
|
+
capacityAssessmentSummary: 'progress summary field', capacityAssessmentRemaining: 'progress remaining field',
|
|
49092
49103
|
capacityMaximumMeasurement: 'Measured or required: {observedCount} {unit}; maximum available: {supportedLimit} {unit} ({countKind}).',
|
|
49093
49104
|
capacityMinimumMeasurement: 'Measured: {observedCount} {unit}; minimum required: {supportedLimit} {unit} ({countKind}).',
|
|
49094
49105
|
capacityUnavailableMeasurement: 'Usage and applicable allocation are unavailable.',
|
|
49095
49106
|
capacityContextUnavailable: 'Source and path-coverage context are unavailable.',
|
|
49096
49107
|
capacitySourceLine: 'Original physical source line: {sourceLineId}.',
|
|
49108
|
+
capacityAssessmentContext: 'Complete inventory: {requirementCount} requirements. Batch: {batch}; requirement: {requirementId}. Batch 0 identifies complete reduction; none means no single requirement is attributed.',
|
|
49097
49109
|
capacityManifestUnavailable: 'not available at this boundary', capacityNoPaths: 'no uncovered paths',
|
|
49098
49110
|
capacityComparison: 'Pinned comparison: {baseSha} → {headSha}. Required-path inventory: {requiredPathsDigest}; source manifest: {manifestDigest}. Accepted progress path receipts: {reviewedPathCount}/{requiredPathCount}; uncovered: {uncoveredPathCount}. Receipt-path inventory: {reviewedPathsDigest}; uncovered-path inventory: {uncoveredPathsDigest}. Paths: {paths}.',
|
|
49099
49111
|
};
|
|
@@ -49110,11 +49122,13 @@ exports.SPANISH_PROGRESS_CAPACITY_LABELS = {
|
|
|
49110
49122
|
capacityAggregateEnvelope: 'envoltura de recibos y reserva mínima de contenido', capacityMinimumFacts: 'reserva mínima de hechos completos',
|
|
49111
49123
|
capacityUnitCount: 'cantidad de unidades de evidencia', capacityAggregateFacts: 'hechos completos del agregado', capacityInvalidAllocation: 'asignación de capacidad no válida',
|
|
49112
49124
|
capacitySourceUnitCount: 'cantidad de unidades de origen',
|
|
49125
|
+
capacityAssessmentSummary: 'campo de resumen del progreso', capacityAssessmentRemaining: 'campo de trabajo pendiente del progreso',
|
|
49113
49126
|
capacityMaximumMeasurement: 'Medido o requerido: {observedCount} {unit}; máximo disponible: {supportedLimit} {unit} ({countKind}).',
|
|
49114
49127
|
capacityMinimumMeasurement: 'Medido: {observedCount} {unit}; mínimo requerido: {supportedLimit} {unit} ({countKind}).',
|
|
49115
49128
|
capacityUnavailableMeasurement: 'El uso y la asignación aplicable no están disponibles.',
|
|
49116
49129
|
capacityContextUnavailable: 'El contexto de origen y cobertura de rutas no está disponible.',
|
|
49117
49130
|
capacitySourceLine: 'Línea física de origen: {sourceLineId}.',
|
|
49131
|
+
capacityAssessmentContext: 'Inventario completo: {requirementCount} requisitos. Lote: {batch}; requisito: {requirementId}. El lote 0 identifica la reducción completa; none indica que no se atribuye a un único requisito.',
|
|
49118
49132
|
capacityManifestUnavailable: 'no disponible en este límite', capacityNoPaths: 'ninguna ruta sin cubrir',
|
|
49119
49133
|
capacityComparison: 'Comparación fijada: {baseSha} → {headSha}. Inventario de rutas requeridas: {requiredPathsDigest}; manifiesto de origen: {manifestDigest}. Recibos de rutas de progreso aceptados: {reviewedPathCount}/{requiredPathCount}; sin cubrir: {uncoveredPathCount}. Inventario de rutas con recibo: {reviewedPathsDigest}; inventario de rutas sin cubrir: {uncoveredPathsDigest}. Rutas: {paths}.',
|
|
49120
49134
|
};
|
|
@@ -49150,6 +49164,7 @@ const PHASES = {
|
|
|
49150
49164
|
};
|
|
49151
49165
|
const UNITS = { bytes: 'capacityBytes', parts: 'capacityParts', lines: 'capacityLines', 'code-points': 'capacityPoints', units: 'capacityUnits' };
|
|
49152
49166
|
const DIMENSIONS = {
|
|
49167
|
+
'assessment-summary-points': 'capacityAssessmentSummary', 'assessment-remaining-points': 'capacityAssessmentRemaining',
|
|
49153
49168
|
'source-unit-bytes': 'capacitySourceUnit', 'source-part-bytes': 'capacitySourcePart', 'source-part-count': 'capacityPartCount',
|
|
49154
49169
|
'source-unit-count': 'capacitySourceUnitCount',
|
|
49155
49170
|
'source-manifest-bytes': 'capacityManifest', 'source-line-count': 'capacityLineCount', 'source-line-points': 'capacityLinePoints',
|
|
@@ -49167,13 +49182,14 @@ function progressCapacityPresentation(input, message) {
|
|
|
49167
49182
|
const measurement = label(facts.bound === 'minimum' ? 'capacityMinimumMeasurement' : facts.bound === 'maximum' ? 'capacityMaximumMeasurement' : 'capacityUnavailableMeasurement', { observedCount, supportedLimit, countKind, unit: label(UNITS[facts.unit]) });
|
|
49168
49183
|
const source = facts.context;
|
|
49169
49184
|
const context = source.kind === 'unavailable' ? label('capacityContextUnavailable')
|
|
49170
|
-
: source.kind === '
|
|
49171
|
-
: label('
|
|
49172
|
-
|
|
49173
|
-
|
|
49174
|
-
|
|
49175
|
-
|
|
49176
|
-
|
|
49185
|
+
: source.kind === 'assessment' ? label('capacityAssessmentContext', source)
|
|
49186
|
+
: source.kind === 'source-line' ? label('capacitySourceLine', { sourceLineId: source.sourceLineId })
|
|
49187
|
+
: label('capacityComparison', { baseSha: source.baseSha, headSha: source.headSha, requiredPathsDigest: source.requiredPathsDigest,
|
|
49188
|
+
reviewedPathsDigest: source.reviewedPathsDigest, uncoveredPathsDigest: source.uncoveredPathsDigest,
|
|
49189
|
+
manifestDigest: source.manifestDigest === 'none' ? label('capacityManifestUnavailable') : source.manifestDigest,
|
|
49190
|
+
requiredPathCount: source.requiredPathCount, reviewedPathCount: source.reviewedPathCount, uncoveredPathCount: source.uncoveredPathCount,
|
|
49191
|
+
paths: source.paths.length ? source.paths.map(progress_evidence_path_1.renderProgressEvidencePath).join('; ') : label('capacityNoPaths') })
|
|
49192
|
+
+ (source.sourceLineId === 'none' ? '' : ` ${label('capacitySourceLine', { sourceLineId: source.sourceLineId })}`);
|
|
49177
49193
|
return Object.freeze({ phase: label(PHASES[facts.phase]), dimension: label(DIMENSIONS[facts.dimension]), measurement, context });
|
|
49178
49194
|
}
|
|
49179
49195
|
|
|
@@ -50326,12 +50342,18 @@ function parseScopedProgressResponse(response, locale, scope, anchors = {}) {
|
|
|
50326
50342
|
reject('requirement-summary-invalid', `${field}.summary`, id);
|
|
50327
50343
|
if (fact.status === 'supported') {
|
|
50328
50344
|
if (fact.remaining !== null)
|
|
50329
|
-
reject('requirement-remaining-
|
|
50345
|
+
reject('requirement-remaining-null-required', `${field}.remaining`, id);
|
|
50330
50346
|
if (fact.evidence !== 'source-only')
|
|
50331
50347
|
reject('requirement-evidence-mismatch', `${field}.evidence`, id);
|
|
50332
50348
|
}
|
|
50333
|
-
else
|
|
50334
|
-
|
|
50349
|
+
else {
|
|
50350
|
+
if (typeof fact.remaining !== 'string')
|
|
50351
|
+
reject('requirement-remaining-string-required', `${field}.remaining`, id);
|
|
50352
|
+
else if (!fact.remaining.trim())
|
|
50353
|
+
reject('requirement-remaining-blank', `${field}.remaining`, id);
|
|
50354
|
+
else if ([...fact.remaining].length > MAX_FACT)
|
|
50355
|
+
reject('requirement-remaining-too-long', `${field}.remaining`, id);
|
|
50356
|
+
}
|
|
50335
50357
|
return { id, status: fact.status, summary: fact.summary, remaining: fact.remaining };
|
|
50336
50358
|
});
|
|
50337
50359
|
const ordered = scope.requirements.map(requirement => ({ requirement, fact: entries.find(entry => entry.id === requirement.id) }));
|
|
@@ -59305,6 +59327,7 @@ async function analyzeProgressBatches(context, issueDescription, captured, diff,
|
|
|
59305
59327
|
bounded.verify();
|
|
59306
59328
|
return (0, progress_batch_policy_1.aggregateProgressAssessmentReceipts)(manifest, batches, receipts);
|
|
59307
59329
|
};
|
|
59330
|
+
(0, logging_ports_1.logInfo)(`Reducing complete same-head assessment: ${scope.requirements.length} requirements, ${receipts.length} of ${batches.length} verified batches; summary and remaining each have an 8000-Unicode-code-point publication limit.`);
|
|
59308
59331
|
const attemptResult = verifyAssessment();
|
|
59309
59332
|
(0, logging_ports_1.logInfo)(`Complete same-head acceptance evidence verified: ${scope.requirements.length} requirements, ${receipts.length} of ${batches.length} batches, ${bounded.calls()} of ${progress_batch_policy_1.PROGRESS_BATCH_PROFILE.calls} calls. Publication identity ${manifest.digest}.`);
|
|
59310
59333
|
return { attemptResult, scopeManifestDigest: manifest.digest, verifyAssessment };
|
|
@@ -93761,6 +93784,8 @@ exports.PROGRESS_CAPACITY_DIMENSIONS = Object.freeze({
|
|
|
93761
93784
|
'minimum-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
93762
93785
|
'evidence-unit-count': rule(['aggregate'], 'units', ['minimum']),
|
|
93763
93786
|
'aggregate-fact-bytes': rule(['aggregate'], 'bytes'),
|
|
93787
|
+
'assessment-summary-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
93788
|
+
'assessment-remaining-points': rule(['assessment', 'aggregate'], 'code-points'),
|
|
93764
93789
|
'invalid-allocation': rule(['input', 'source', 'scope', 'partition', 'aggregate', 'assessment'], 'bytes', ['unavailable']),
|
|
93765
93790
|
});
|
|
93766
93791
|
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -93785,6 +93810,15 @@ function normalizeProgressCapacityContext(value) {
|
|
|
93785
93810
|
return invalid();
|
|
93786
93811
|
return Object.freeze({ kind: 'source-line', sourceLineId: value.sourceLineId });
|
|
93787
93812
|
}
|
|
93813
|
+
if (value.kind === 'assessment') {
|
|
93814
|
+
if (!exact(value, ['kind', 'requirementCount', 'batch', 'requirementId'])
|
|
93815
|
+
|| !count(value.requirementCount) || value.requirementCount < 1 || value.requirementCount > 256
|
|
93816
|
+
|| !count(value.batch) || value.batch > value.requirementCount
|
|
93817
|
+
|| !(value.requirementId === 'none' || (0, progress_response_diagnostic_1.isProgressRequirementId)(value.requirementId))
|
|
93818
|
+
|| (value.batch === 0 && value.requirementId !== 'none'))
|
|
93819
|
+
return invalid();
|
|
93820
|
+
return Object.freeze({ kind: 'assessment', requirementCount: value.requirementCount, batch: value.batch, requirementId: value.requirementId });
|
|
93821
|
+
}
|
|
93788
93822
|
if (value.kind !== 'comparison' || !exact(value, ['kind', 'baseSha', 'headSha', 'manifestDigest', 'requiredPathsDigest',
|
|
93789
93823
|
'reviewedPathsDigest', 'uncoveredPathsDigest', 'requiredPathCount', 'reviewedPathCount', 'uncoveredPathCount', 'paths', 'sourceLineId'])
|
|
93790
93824
|
|| !oid(value.baseSha) || !oid(value.headSha) || !(value.manifestDigest === 'none' || digest(value.manifestDigest))
|
|
@@ -93823,6 +93857,9 @@ function normalizeProgressCapacityDiagnostic(value) {
|
|
|
93823
93857
|
&& (value.bound === 'minimum' ? value.observedCount >= value.supportedLimit : value.observedCount <= value.supportedLimit))
|
|
93824
93858
|
return invalid();
|
|
93825
93859
|
const context = normalizeProgressCapacityContext(value.context);
|
|
93860
|
+
if (context.kind === 'assessment' && (!['assessment-summary-points', 'assessment-remaining-points'].includes(dimension)
|
|
93861
|
+
|| (value.phase === 'aggregate' ? context.batch !== 0 : context.batch === 0)))
|
|
93862
|
+
return invalid();
|
|
93826
93863
|
const sourceLineId = context.kind === 'source-line' || context.kind === 'comparison' ? context.sourceLineId : 'none';
|
|
93827
93864
|
if (sourceLineId !== 'none' && (value.phase !== 'scope'
|
|
93828
93865
|
|| !['source-line-count', 'source-line-points'].includes(dimension)))
|
|
@@ -94014,7 +94051,9 @@ exports.PROGRESS_RESPONSE_REASONS = Object.freeze({
|
|
|
94014
94051
|
'partition-file-invalid', 'partition-unit-invalid', 'partition-facts-invalid']),
|
|
94015
94052
|
assessment: Object.freeze([...schemaReasons, 'requirements-incomplete', 'progress-invalid', 'requirement-shape-invalid', 'requirement-id-invalid',
|
|
94016
94053
|
'requirement-id-duplicate', 'scope-uncertain', 'requirement-status-invalid', 'requirement-evidence-invalid', 'requirement-summary-invalid',
|
|
94017
|
-
'requirement-remaining-invalid', 'requirement-
|
|
94054
|
+
'requirement-remaining-invalid', 'requirement-remaining-null-required', 'requirement-remaining-string-required',
|
|
94055
|
+
'requirement-remaining-blank', 'requirement-remaining-too-long',
|
|
94056
|
+
'requirement-evidence-mismatch', 'progress-completion-mismatch', 'assessment-text-limit']),
|
|
94018
94057
|
});
|
|
94019
94058
|
const fieldPatterns = Object.freeze({
|
|
94020
94059
|
scope: /^\$(?:\.outputLocale|\.lines(?:\[(0|[1-9]\d{0,3})\](?:\.(?:id|kind|sameAs))?)?)?$/u,
|