feat(corporate): persist dated monthly plans and repair verified release gates
Deploy Canina / deploy (push) Successful in 4m38s
Deploy Canina / deploy (push) Successful in 4m38s
This commit is contained in:
1 parent
18094f91a6
commit
216e05ba25
18 files changed
+829
-29
No files matched your search
@@ -202,6 +202,13 @@ def ingest(client, store, manifest, hosts, key):
|
||||
return {'research': result, 'requestDigest': request_digest}
|
||||
|
||||
|
||||
def monthly_plan(client, store, body, key):
|
||||
# Backend owns calendar and stored-lineage validation. Preserve the exact
|
||||
# request before transmission; an ambiguous POST is never retried blindly.
|
||||
digest = client.checkpoint(store, key, 'monthly-plans', body)
|
||||
return {'plan': client.call('monthly-plans', body, key), 'checkpointDigest': digest}
|
||||
|
||||
|
||||
def fanout(client, roadmap, key):
|
||||
tasks = []
|
||||
for goal in roadmap['goals']:
|
||||
@@ -261,6 +268,8 @@ def main():
|
||||
i = sub.add_parser('replay-ingest'); i.add_argument('request_digest')
|
||||
i = sub.add_parser('replay-evidence'); i.add_argument('checkpoint_digest')
|
||||
i = sub.add_parser('roadmap'); i.add_argument('manifest')
|
||||
i = sub.add_parser('plan-month'); i.add_argument('manifest')
|
||||
i = sub.add_parser('read-plan'); i.add_argument('roadmap_id'); i.add_argument('month')
|
||||
i = sub.add_parser('fanout'); i.add_argument('roadmap_id')
|
||||
i = sub.add_parser('execute'); i.add_argument('--department', required=True)
|
||||
i = sub.add_parser('qa'); i.add_argument('task_id'); i.add_argument('evidence_id')
|
||||
@@ -268,7 +277,7 @@ def main():
|
||||
i = sub.add_parser('report'); i.add_argument('manifest')
|
||||
sub.add_parser('status')
|
||||
a = p.parse_args()
|
||||
if a.command != 'status' and not a.key:
|
||||
if a.command not in ('status', 'read-plan') and not a.key:
|
||||
p.error('--key required for mutations')
|
||||
c = Client(a.api, 'CORPORATE_QA_API_KEY' if a.command == 'qa' else 'CORPORATE_API_KEY', a.allow_stage_https)
|
||||
s = Store(a.store)
|
||||
@@ -280,6 +289,11 @@ def main():
|
||||
body = load()
|
||||
if body.get('isActive') is not False: raise ValueError('Manual roadmap must explicitly be inactive')
|
||||
result = c.call('monthly-roadmap', body, a.key)
|
||||
elif a.command == 'plan-month': result = monthly_plan(c, s, load(), a.key)
|
||||
elif a.command == 'read-plan':
|
||||
if not re.fullmatch(r'[a-f0-9-]{36}', a.roadmap_id) or not re.fullmatch(r'[2-9][0-9]{3}-(0[1-9]|1[0-2])', a.month):
|
||||
raise ValueError('Invalid roadmap/month')
|
||||
result = c.call('monthly-plans/' + a.roadmap_id + '?month=' + a.month)
|
||||
elif a.command == 'fanout':
|
||||
page = 1
|
||||
while True:
|
||||
|
||||
Reference in new issue
Block a user