fix endpoints plugin CI failures

Migration tests knew no endpoints head revision, so the parametrized guards raised KeyError. Register it in EXPECTED_HEAD_REVISION.

EndpointState declared lastreportedat both index=True and an explicit db.Index over the same column, and the baseline migration named single-column indexes differently from what create_all builds. On a pre-existing table the name-keyed guard could not see the create_all index and added a duplicate, tripping the idempotency guard. Drop the redundant declaration and rename migration indexes to ix_<table>_<column> to match.

endpoints was absent from the universal site profile, so the installer would not offer it and prune-schema would drop its tables at provisioning. Add it.

The agent design record lived under docs/, which is stripped to the public wiki and normally absent from the tree; a lone file there un-skipped the wiki-publish guards. Move it into the plugin.
This commit is contained in:
benjamin.baker
2026-08-27 07:10:43 -04:00
parent 3deff4f716
commit d68c6db9ab
5 changed files with 15 additions and 12 deletions

View File

@@ -82,10 +82,6 @@ class EndpointState(db.Model):
createdat = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
__table_args__ = (
db.Index('idx_endpointstates_lastreportedat', 'lastreportedat'),
)
def __repr__(self):
return f"<EndpointState {self.hostname or self.assetid}>"