mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-06 12:51:54 +00:00
Add schedules and context locality telemetry
This commit is contained in:
1 parent
d2837581d9
commit
55a4981567
17 files changed
+729
-15
No files matched your search
@@ -314,6 +314,7 @@ export function proposeDomains({ repository, analysis }) {
|
||||
resources: analysis.inventory.scarceResources.map((id) => ({
|
||||
id, capacity: 1, queue: 'fifo', max_hold_seconds: 3600,
|
||||
})),
|
||||
schedules: [],
|
||||
architecture: graph,
|
||||
};
|
||||
}
|
||||
@@ -360,6 +361,14 @@ export function validateApprovedProposal({ proposal, repository }) {
|
||||
for (const collision of proposal?.collisions ?? []) {
|
||||
if (!collision.resolution?.strategy) problems.push(`collision ${collision.domains?.join('/')} has no resolution`);
|
||||
}
|
||||
for (const schedule of proposal?.schedules ?? []) {
|
||||
if (!schedule.id || !['system', 'session'].includes(schedule.lifetime)
|
||||
|| !['read-only', 'mutating'].includes(schedule.behavior)
|
||||
|| !schedule.owner || !schedule.trigger || !schedule.action
|
||||
|| !schedule.required_authority?.length || !schedule.source_of_truth) {
|
||||
problems.push(`schedule ${schedule.id ?? '<missing>'} is incomplete`);
|
||||
}
|
||||
}
|
||||
if (proposal?.session_manager?.worktree_name !== undefined
|
||||
&& proposal.session_manager.worktree_name !== null
|
||||
&& !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(proposal.session_manager.worktree_name)) {
|
||||
|
||||
@@ -47,6 +47,7 @@ function initialFiles({ repository, projectId, createdAt, proposal }) {
|
||||
},
|
||||
checks: proposal.checks ?? [],
|
||||
resources: proposal.resources ?? [],
|
||||
schedules: proposal.schedules ?? [],
|
||||
integration: {
|
||||
provider: 'torch', target: repository.branch || 'main', require_current_main: true,
|
||||
required_checks: (proposal.checks ?? []).map((check) => check.id),
|
||||
|
||||
Reference in new issue
Block a user